From 9b1a7b26c781e18eea12f82124e2fb8a57872f33 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 27 十月 2023 18:08:09 +0800
Subject: [PATCH] 代码提交
---
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceOrganallocationService.java | 11 +
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceOrganallocationController.java | 49 ++++++---
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java | 28 ++--
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java | 2
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceOrganallocationServiceImpl.java | 163 +++++++++++++++++++-------------
ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonatebaseinfo.java | 5 +
ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml | 1
7 files changed, 158 insertions(+), 101 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceOrganallocationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceOrganallocationController.java
index 0e55cfc..bac82e9 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceOrganallocationController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceOrganallocationController.java
@@ -21,15 +21,14 @@
/**
* 鍣ㄥ畼鍒嗛厤Controller
- *
+ *
* @author ruoyi
* @date 2021-11-10
*/
@Api("鍣ㄥ畼鍒嗛厤绠$悊")
@RestController
@RequestMapping("/project/organallocation")
-public class ServiceOrganallocationController extends BaseController
-{
+public class ServiceOrganallocationController extends BaseController {
@Autowired
private IServiceOrganallocationService serviceOrganallocationService;
@@ -39,8 +38,7 @@
@ApiOperation("鍣ㄥ畼鍒嗛厤淇℃伅鍒楄〃")
//@PreAuthorize("@ss.hasPermi('project:organallocation:list')")
@GetMapping("/list")
- public TableDataInfo list(ServiceOrganallocation serviceOrganallocation)
- {
+ public TableDataInfo list(ServiceOrganallocation serviceOrganallocation) {
startPage();
//List<ServiceOrganallocation> list = serviceOrganallocationService.queryList(serviceOrganallocation);
List<ServiceOrganallocation> list = serviceOrganallocationService.selectServiceOrganallocationList(serviceOrganallocation);
@@ -54,8 +52,7 @@
//@PreAuthorize("@ss.hasPermi('project:organallocation:export')")
@Log(title = "鍣ㄥ畼鍒嗛厤", businessType = BusinessType.EXPORT)
@GetMapping("/export")
- public AjaxResult export(ServiceOrganallocation serviceOrganallocation)
- {
+ public AjaxResult export(ServiceOrganallocation serviceOrganallocation) {
List<ServiceOrganallocation> list = serviceOrganallocationService.queryList(serviceOrganallocation);
ExcelUtil<ServiceOrganallocation> util = new ExcelUtil<ServiceOrganallocation>(ServiceOrganallocation.class);
return util.exportExcel(list, "鍣ㄥ畼鍒嗛厤鏁版嵁");
@@ -67,8 +64,7 @@
@ApiOperation("閫氳繃id鑾峰彇鍣ㄥ畼鍒嗛厤淇℃伅")
//@PreAuthorize("@ss.hasPermi('project:organallocation:query')")
@GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id)
- {
+ public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(serviceOrganallocationService.getById(id));
}
@@ -80,9 +76,20 @@
@Log(title = "鍣ㄥ畼鍒嗛厤", businessType = BusinessType.INSERT)
@PostMapping
@RepeatSubmit
- public AjaxResult add(@RequestBody ServiceOrganallocation serviceOrganallocation)
- {
+ public AjaxResult add(@RequestBody ServiceOrganallocation serviceOrganallocation) {
return toAjax(serviceOrganallocationService.save(serviceOrganallocation));
+ }
+
+ /**
+ * 鏂板鍣ㄥ畼鍒嗛厤
+ */
+ @ApiOperation("鏂板鍣ㄥ畼鍒嗛厤闆嗗悎淇℃伅")
+ @Log(title = "鍣ㄥ畼鍒嗛厤闆嗗悎", businessType = BusinessType.INSERT)
+ @PostMapping("/add")
+ @RepeatSubmit
+ public AjaxResult addArrayData(@RequestBody List<ServiceOrganallocation> serviceOrganallocations) {
+ return AjaxResult.success(serviceOrganallocationService.saveDate(serviceOrganallocations));
+
}
/**
@@ -92,10 +99,21 @@
//@PreAuthorize("@ss.hasPermi('project:organallocation:edit')")
@Log(title = "鍣ㄥ畼鍒嗛厤", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
- @RepeatSubmit
- public AjaxResult edit(@RequestBody ServiceOrganallocation serviceOrganallocation)
- {
+ @RepeatSubmit
+ public AjaxResult edit(@RequestBody ServiceOrganallocation serviceOrganallocation) {
return toAjax(serviceOrganallocationService.updateById(serviceOrganallocation));
+ }
+
+ /**
+ * 淇敼鍣ㄥ畼鍒嗛厤
+ */
+ @ApiOperation("淇敼鍣ㄥ畼鍒嗛厤淇℃伅")
+ //@PreAuthorize("@ss.hasPermi('project:organallocation:edit')")
+ @Log(title = "鍣ㄥ畼鍒嗛厤", businessType = BusinessType.UPDATE)
+ @PostMapping("/editarraydata")
+ @RepeatSubmit
+ public AjaxResult editArrayData(@RequestBody List<ServiceOrganallocation> serviceOrganallocations) {
+ return AjaxResult.success(serviceOrganallocationService.editArrayData(serviceOrganallocations));
}
/**
@@ -105,8 +123,7 @@
//@PreAuthorize("@ss.hasPermi('project:organallocation:remove')")
@Log(title = "鍣ㄥ畼鍒嗛厤", businessType = BusinessType.DELETE)
@GetMapping("/remove/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids)
- {
+ public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(serviceOrganallocationService.removeByIds(Arrays.asList(ids)));
}
}
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonatebaseinfo.java b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonatebaseinfo.java
index 51cc028..127ad58 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonatebaseinfo.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/domain/ServiceDonatebaseinfo.java
@@ -382,4 +382,9 @@
private Integer workflow;
+ @ApiModelProperty("缁堟妗堜緥锛�0寮�鍚紝1缁堟 榛樿鍊硷細0")
+ @Excel(name = "缁堟妗堜緥")
+ private Integer terminationCase;
+
+
}
\ No newline at end of file
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceOrganallocationService.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceOrganallocationService.java
index c3df616..62ae68f 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceOrganallocationService.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceOrganallocationService.java
@@ -7,20 +7,23 @@
/**
* 鍣ㄥ畼鍒嗛厤Service鎺ュ彛
- *
+ *
* @author ruoyi
* @date 2021-11-10
*/
-public interface IServiceOrganallocationService extends IService<ServiceOrganallocation>
-{
+public interface IServiceOrganallocationService extends IService<ServiceOrganallocation> {
/**
* 鏌ヨ鍣ㄥ畼鍒嗛厤鍒楄〃
- *
+ *
* @param serviceOrganallocation 鍣ㄥ畼鍒嗛厤
* @return 鍣ㄥ畼鍒嗛厤闆嗗悎
*/
public List<ServiceOrganallocation> queryList(ServiceOrganallocation serviceOrganallocation);
List<ServiceOrganallocation> selectServiceOrganallocationList(ServiceOrganallocation serviceOrganallocation);
+
+ List<ServiceOrganallocation> saveDate(List<ServiceOrganallocation> serviceOrganallocations);
+
+ Boolean editArrayData(List<ServiceOrganallocation> serviceOrganallocations);
}
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java
index 0be0fee..ccc033f 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceDonatebaseinfoServiceImpl.java
@@ -273,8 +273,8 @@
}
//灏佽serviceDonateorgan娼滃湪鎹愮尞鏁版嵁
Map<String, String> donateorgan = new HashMap<>();
- donateorgan.put("createtime", serviceDonatebaseinfo.getCreateTime().toString());
- donateorgan.put("updatetime", serviceDonatebaseinfo.getUpdateTime().toString());
+ donateorgan.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonatebaseinfo.getCreateTime()));
+ donateorgan.put("updatetime", serviceDonatebaseinfo.getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonatebaseinfo.getUpdateTime()) : "");
donateorgan.put("process", "");
//灏佽serviceDonateorgan娼滃湪鎹愮尞杩斿洖鏁版嵁
map.put("donateorgan", donateorgan);
@@ -286,8 +286,8 @@
serviceMedicalevaluation.setInfoid(id);
List<ServiceMedicalevaluation> serviceMedicalevaluations = serviceMedicalevaluationService.queryList(serviceMedicalevaluation);
if (!CollectionUtils.isEmpty(serviceMedicalevaluations)) {
- medicalevaluation.put("createtime", serviceMedicalevaluations.get(0).getCreateTime().toString());
- medicalevaluation.put("updatetime", serviceMedicalevaluations.get(0).getUpdateTime().toString());
+ medicalevaluation.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceMedicalevaluations.get(0).getCreateTime()));
+ medicalevaluation.put("updatetime", serviceMedicalevaluations.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceMedicalevaluations.get(0).getUpdateTime()) : null);
medicalevaluation.put("process", "");
}
}
@@ -301,8 +301,8 @@
serviceRelativesconfirmation.setInfoid(id);
List<ServiceRelativesconfirmation> serviceRelativesconfirmations = serviceRelativesconfirmationService.queryList(serviceRelativesconfirmation);
if (!CollectionUtils.isEmpty(serviceRelativesconfirmations)) {
- relativesconfirmation.put("createtime", serviceRelativesconfirmations.get(0).getCreateTime().toString());
- relativesconfirmation.put("updatetime", serviceRelativesconfirmations.get(0).getUpdateTime().toString());
+ relativesconfirmation.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceRelativesconfirmations.get(0).getCreateTime()));
+ relativesconfirmation.put("updatetime", serviceRelativesconfirmations.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceRelativesconfirmations.get(0).getUpdateTime()) : "");
relativesconfirmation.put("process", "");
}
}
@@ -317,8 +317,8 @@
serviceEthicalreviewopinions.setInfoid(id);
List<ServiceEthicalreviewopinions> serviceEthicalreviewopinionsList = serviceEthicalreviewopinionsService.queryList(serviceEthicalreviewopinions);
if (!CollectionUtils.isEmpty(serviceEthicalreviewopinionsList)) {
- ethicalreviewopinions.put("createtime", serviceEthicalreviewopinionsList.get(0).getCreateTime().toString());
- ethicalreviewopinions.put("updatetime", serviceEthicalreviewopinionsList.get(0).getUpdateTime().toString());
+ ethicalreviewopinions.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceEthicalreviewopinionsList.get(0).getCreateTime()));
+ ethicalreviewopinions.put("updatetime", serviceEthicalreviewopinionsList.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceEthicalreviewopinionsList.get(0).getUpdateTime()) : "");
ethicalreviewopinions.put("process", "");
}
}
@@ -332,8 +332,8 @@
serviceOrganallocation.setOrganid(id);
List<ServiceOrganallocation> serviceOrganallocations = serviceOrganallocationService.selectServiceOrganallocationList(serviceOrganallocation);
if (!CollectionUtils.isEmpty(serviceOrganallocations)) {
- organallocationService.put("createtime", serviceOrganallocations.get(0).getCreateTime().toString());
- organallocationService.put("updatetime", serviceOrganallocations.get(0).getUpdateTime().toString());
+ organallocationService.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceOrganallocations.get(0).getCreateTime()));
+ organallocationService.put("updatetime", serviceOrganallocations.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceOrganallocations.get(0).getUpdateTime()) : "");
organallocationService.put("process", "");
}
}
@@ -345,8 +345,8 @@
if (serviceDonatebaseinfo.getWorkflow() >= 5) {
ServiceDonationwitness serviceDonationwitness = serviceDonationwitnessService.getByInfoId(id);
if (!ObjectUtils.isEmpty(serviceDonationwitness)) {
- donationwitness.put("createtime", serviceDonationwitness.getCreateTime().toString());
- donationwitness.put("updatetime", serviceDonationwitness.getUpdateTime().toString());
+ donationwitness.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonationwitness.getCreateTime()));
+ donationwitness.put("updatetime", serviceDonationwitness.getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonationwitness.getUpdateTime()) : "");
donationwitness.put("process", "");
}
}
@@ -360,8 +360,8 @@
serviceDonatecompletioninfo.setInfoid(id);
List<ServiceDonatecompletioninfo> serviceDonatecompletioninfos = serviceDonatecompletioninfoService.queryList(serviceDonatecompletioninfo);
if (!CollectionUtils.isEmpty(serviceDonatecompletioninfos)) {
- donatecompletioninfo.put("createtime", serviceDonatecompletioninfos.get(0).getCreateTime().toString());
- donatecompletioninfo.put("updatetime", serviceDonatecompletioninfos.get(0).getUpdateTime().toString());
+ donatecompletioninfo.put("createtime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonatecompletioninfos.get(0).getCreateTime()));
+ donatecompletioninfo.put("updatetime", serviceDonatecompletioninfos.get(0).getUpdateTime() != null ? DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", serviceDonatecompletioninfos.get(0).getUpdateTime()) : "");
donatecompletioninfo.put("process", "");
}
}
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
index 51d2606..89b93c7 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceFundServiceImpl.java
@@ -681,7 +681,7 @@
}
@Override
- @Transactional
+ @Transactional(rollbackFor = Exception.class)
public Long addOrUpdateNew(ServiceFundVO serviceFundVO) {
Long id = null;
//灏嗘暟鎹繚瀛樺埌fund琛�
diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceOrganallocationServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceOrganallocationServiceImpl.java
index f873f66..32b3dfc 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceOrganallocationServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceOrganallocationServiceImpl.java
@@ -1,9 +1,11 @@
package com.ruoyi.project.service.impl;
+import java.util.ArrayList;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysRole;
import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.exception.base.BaseException;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -14,16 +16,20 @@
import com.ruoyi.project.mapper.ServiceOrganallocationMapper;
import com.ruoyi.project.domain.ServiceOrganallocation;
import com.ruoyi.project.service.IServiceOrganallocationService;
+import org.springframework.transaction.PlatformTransactionManager;
+import org.springframework.transaction.TransactionDefinition;
+import org.springframework.transaction.TransactionStatus;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.support.DefaultTransactionDefinition;
/**
* 鍣ㄥ畼鍒嗛厤Service涓氬姟灞傚鐞�
- *
+ *
* @author ruoyi
* @date 2021-11-10
*/
@Service
-public class ServiceOrganallocationServiceImpl extends ServiceImpl<ServiceOrganallocationMapper, ServiceOrganallocation> implements IServiceOrganallocationService
-{
+public class ServiceOrganallocationServiceImpl extends ServiceImpl<ServiceOrganallocationMapper, ServiceOrganallocation> implements IServiceOrganallocationService {
@Autowired
ServiceOrganallocationMapper serviceOrganallocationMapper;
@@ -31,99 +37,99 @@
/**
* 鏌ヨ鍣ㄥ畼鍒嗛厤鍒楄〃
- *
+ *
* @param serviceOrganallocation 鍣ㄥ畼鍒嗛厤
* @return 鍣ㄥ畼鍒嗛厤
*/
@Override
public List<ServiceOrganallocation> queryList(ServiceOrganallocation serviceOrganallocation) {
LambdaQueryWrapper<ServiceOrganallocation> wrappers = Wrappers.lambdaQuery();
- if (serviceOrganallocation.getOrganid() != null){
- wrappers.eq(ServiceOrganallocation::getOrganid ,serviceOrganallocation.getOrganid());
+ if (serviceOrganallocation.getOrganid() != null) {
+ wrappers.eq(ServiceOrganallocation::getOrganid, serviceOrganallocation.getOrganid());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getOrgannumber())){
- wrappers.eq(ServiceOrganallocation::getOrgannumber ,serviceOrganallocation.getOrgannumber());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getOrgannumber())) {
+ wrappers.eq(ServiceOrganallocation::getOrgannumber, serviceOrganallocation.getOrgannumber());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getApplicantuserid())){
- wrappers.eq(ServiceOrganallocation::getApplicantuserid ,serviceOrganallocation.getApplicantuserid());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getApplicantuserid())) {
+ wrappers.eq(ServiceOrganallocation::getApplicantuserid, serviceOrganallocation.getApplicantuserid());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getApplicantusername())){
- wrappers.like(ServiceOrganallocation::getApplicantusername ,serviceOrganallocation.getApplicantusername());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getApplicantusername())) {
+ wrappers.like(ServiceOrganallocation::getApplicantusername, serviceOrganallocation.getApplicantusername());
}
- if (serviceOrganallocation.getApplicanttime() != null){
- wrappers.eq(ServiceOrganallocation::getApplicanttime ,serviceOrganallocation.getApplicanttime());
+ if (serviceOrganallocation.getApplicanttime() != null) {
+ wrappers.eq(ServiceOrganallocation::getApplicanttime, serviceOrganallocation.getApplicanttime());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getCheckuserid())){
- wrappers.eq(ServiceOrganallocation::getCheckuserid ,serviceOrganallocation.getCheckuserid());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getCheckuserid())) {
+ wrappers.eq(ServiceOrganallocation::getCheckuserid, serviceOrganallocation.getCheckuserid());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getCheckusername())){
- wrappers.like(ServiceOrganallocation::getCheckusername ,serviceOrganallocation.getCheckusername());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getCheckusername())) {
+ wrappers.like(ServiceOrganallocation::getCheckusername, serviceOrganallocation.getCheckusername());
}
- if (serviceOrganallocation.getChecktime() != null){
- wrappers.eq(ServiceOrganallocation::getChecktime ,serviceOrganallocation.getChecktime());
+ if (serviceOrganallocation.getChecktime() != null) {
+ wrappers.eq(ServiceOrganallocation::getChecktime, serviceOrganallocation.getChecktime());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getChecksuggestion())){
- wrappers.eq(ServiceOrganallocation::getChecksuggestion ,serviceOrganallocation.getChecksuggestion());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getChecksuggestion())) {
+ wrappers.eq(ServiceOrganallocation::getChecksuggestion, serviceOrganallocation.getChecksuggestion());
}
- if (serviceOrganallocation.getAllocationstatus() != null){
- wrappers.eq(ServiceOrganallocation::getAllocationstatus ,serviceOrganallocation.getAllocationstatus());
+ if (serviceOrganallocation.getAllocationstatus() != null) {
+ wrappers.eq(ServiceOrganallocation::getAllocationstatus, serviceOrganallocation.getAllocationstatus());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getName())){
- wrappers.like(ServiceOrganallocation::getName ,serviceOrganallocation.getName());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getName())) {
+ wrappers.like(ServiceOrganallocation::getName, serviceOrganallocation.getName());
}
- if (serviceOrganallocation.getSex() != null){
- wrappers.eq(ServiceOrganallocation::getSex ,serviceOrganallocation.getSex());
+ if (serviceOrganallocation.getSex() != null) {
+ wrappers.eq(ServiceOrganallocation::getSex, serviceOrganallocation.getSex());
}
- if (serviceOrganallocation.getIdcardtype() != null){
- wrappers.eq(ServiceOrganallocation::getIdcardtype ,serviceOrganallocation.getIdcardtype());
+ if (serviceOrganallocation.getIdcardtype() != null) {
+ wrappers.eq(ServiceOrganallocation::getIdcardtype, serviceOrganallocation.getIdcardtype());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getIdcardno())){
- wrappers.eq(ServiceOrganallocation::getIdcardno ,serviceOrganallocation.getIdcardno());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getIdcardno())) {
+ wrappers.eq(ServiceOrganallocation::getIdcardno, serviceOrganallocation.getIdcardno());
}
- if (serviceOrganallocation.getAge() != null){
- wrappers.eq(ServiceOrganallocation::getAge ,serviceOrganallocation.getAge());
+ if (serviceOrganallocation.getAge() != null) {
+ wrappers.eq(ServiceOrganallocation::getAge, serviceOrganallocation.getAge());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getAgeunit())){
- wrappers.eq(ServiceOrganallocation::getAgeunit ,serviceOrganallocation.getAgeunit());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getAgeunit())) {
+ wrappers.eq(ServiceOrganallocation::getAgeunit, serviceOrganallocation.getAgeunit());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getBirthday())){
- wrappers.eq(ServiceOrganallocation::getBirthday ,serviceOrganallocation.getBirthday());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getBirthday())) {
+ wrappers.eq(ServiceOrganallocation::getBirthday, serviceOrganallocation.getBirthday());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getPhone())){
- wrappers.eq(ServiceOrganallocation::getPhone ,serviceOrganallocation.getPhone());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getPhone())) {
+ wrappers.eq(ServiceOrganallocation::getPhone, serviceOrganallocation.getPhone());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidenceaddress())){
- wrappers.eq(ServiceOrganallocation::getResidenceaddress ,serviceOrganallocation.getResidenceaddress());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidenceaddress())) {
+ wrappers.eq(ServiceOrganallocation::getResidenceaddress, serviceOrganallocation.getResidenceaddress());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidenceprovince())){
- wrappers.eq(ServiceOrganallocation::getResidenceprovince ,serviceOrganallocation.getResidenceprovince());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidenceprovince())) {
+ wrappers.eq(ServiceOrganallocation::getResidenceprovince, serviceOrganallocation.getResidenceprovince());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidenceprovincename())){
- wrappers.like(ServiceOrganallocation::getResidenceprovincename ,serviceOrganallocation.getResidenceprovincename());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidenceprovincename())) {
+ wrappers.like(ServiceOrganallocation::getResidenceprovincename, serviceOrganallocation.getResidenceprovincename());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecity())){
- wrappers.eq(ServiceOrganallocation::getResidencecity ,serviceOrganallocation.getResidencecity());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecity())) {
+ wrappers.eq(ServiceOrganallocation::getResidencecity, serviceOrganallocation.getResidencecity());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecityname())){
- wrappers.like(ServiceOrganallocation::getResidencecityname ,serviceOrganallocation.getResidencecityname());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecityname())) {
+ wrappers.like(ServiceOrganallocation::getResidencecityname, serviceOrganallocation.getResidencecityname());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidencetown())){
- wrappers.eq(ServiceOrganallocation::getResidencetown ,serviceOrganallocation.getResidencetown());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidencetown())) {
+ wrappers.eq(ServiceOrganallocation::getResidencetown, serviceOrganallocation.getResidencetown());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidencetownname())){
- wrappers.like(ServiceOrganallocation::getResidencetownname ,serviceOrganallocation.getResidencetownname());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidencetownname())) {
+ wrappers.like(ServiceOrganallocation::getResidencetownname, serviceOrganallocation.getResidencetownname());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecommunity())){
- wrappers.eq(ServiceOrganallocation::getResidencecommunity ,serviceOrganallocation.getResidencecommunity());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecommunity())) {
+ wrappers.eq(ServiceOrganallocation::getResidencecommunity, serviceOrganallocation.getResidencecommunity());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecommunityname())){
- wrappers.like(ServiceOrganallocation::getResidencecommunityname ,serviceOrganallocation.getResidencecommunityname());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecommunityname())) {
+ wrappers.like(ServiceOrganallocation::getResidencecommunityname, serviceOrganallocation.getResidencecommunityname());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecountycode())){
- wrappers.eq(ServiceOrganallocation::getResidencecountycode ,serviceOrganallocation.getResidencecountycode());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecountycode())) {
+ wrappers.eq(ServiceOrganallocation::getResidencecountycode, serviceOrganallocation.getResidencecountycode());
}
- if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecountyname())){
- wrappers.like(ServiceOrganallocation::getResidencecountyname ,serviceOrganallocation.getResidencecountyname());
+ if (StringUtils.isNotBlank(serviceOrganallocation.getResidencecountyname())) {
+ wrappers.like(ServiceOrganallocation::getResidencecountyname, serviceOrganallocation.getResidencecountyname());
}
return this.list(wrappers);
}
@@ -132,18 +138,43 @@
public List<ServiceOrganallocation> selectServiceOrganallocationList(ServiceOrganallocation serviceOrganallocation) {
SysUser user = SecurityUtils.getLoginUser().getUser();
- List <SysRole> l = user.getRoles();
+ List<SysRole> l = user.getRoles();
Boolean b = false;
- for(SysRole r : l){
- if(r.getRoleId().longValue() == 3){
+ for (SysRole r : l) {
+ if (r.getRoleId().longValue() == 3) {
b = true;
}
}
- if(b){
+ if (b) {
serviceOrganallocation.setCreateBy(user.getUserName());
}
return serviceOrganallocationMapper.selectServiceOrganallocationList(serviceOrganallocation);
}
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public List<ServiceOrganallocation> saveDate(List<ServiceOrganallocation> serviceOrganallocations) {
+
+ for (ServiceOrganallocation serviceOrganallocation : serviceOrganallocations) {
+ this.save(serviceOrganallocation);
+ }
+ //灏嗗甫ID鐨勬暟鎹繑鍥�
+ return serviceOrganallocations;
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public Boolean editArrayData(List<ServiceOrganallocation> serviceOrganallocations) {
+ for (ServiceOrganallocation serviceOrganallocation : serviceOrganallocations) {
+ if (serviceOrganallocation.getId() == null) {
+ throw new BaseException("id涓虹┖浜� 锛�" + serviceOrganallocation);
+ }
+ this.updateById(serviceOrganallocation);
+ }
+ //灏嗗甫ID鐨勬暟鎹繑鍥�
+ return true;
+ }
+
}
diff --git a/ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml b/ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml
index d9edf63..d885da3 100644
--- a/ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml
+++ b/ruoyi-project/src/main/resources/mapper/project/ServiceDonatebaseinfoMapper.xml
@@ -69,6 +69,7 @@
<result property="del_flag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
+ <result property="terminationCase" column="termination_case" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="nation" column="Nation" />
--
Gitblit v1.9.3