Compare commits

..

No commits in common. "b02599f3a1ffb981dd120aa40edd0790b6d52f25" and "91c7522135fc8a70ca39d8e47b18b0c7a1019e47" have entirely different histories.

10 changed files with 52 additions and 112 deletions

View File

@ -53,16 +53,11 @@ public class BusinessController {
@SysLog(title = "入场申请", businessType = OperaType.QUERY, logType = 0, module = "入场申请", details = "提交审批")
public AjaxResult submitMulApproval(@RequestBody AuditTask auditTask) {
String[] uuidArr = auditTask.getUuid().split(",");
String[] taskIdArr = new String[0];
if (StringUtils.isNotBlank(auditTask.getTaskId())){
taskIdArr = auditTask.getTaskId().split(",");
}
String[] taskIdArr = auditTask.getTaskId().split(",");
AjaxResult code = null;
for (int i = 0; i < uuidArr.length; i++) {
auditTask.setUuid(uuidArr[i]);
if (taskIdArr.length > 0) {
auditTask.setTaskId(taskIdArr[i]);
}
auditTask.setTaskId(taskIdArr[i]);
code = businessService.submitApproval(auditTask);
if (!StaticVariableUtils.REVIEW_SUBMITTED_SUCCESSFULLY.equals(code.get("msg"))) {
if (StaticVariableUtils.THEAUDITFLOWNEEDSTOBECONFIGURED.equals(code.get("msg"))) {
@ -96,12 +91,12 @@ public class BusinessController {
if (!StaticVariableUtils.REVIEW_SUBMITTED_SUCCESSFULLY.equals(code.get("msg"))) {
if (StaticVariableUtils.THEAUDITFLOWNEEDSTOBECONFIGURED.equals(code.get("msg"))) {
return code;
} else {
}else {
throw new RuntimeException("提交失败");
}
}
}
} else {
}else{
return businessService.submitApproval(auditTask);
}
} catch (Exception e) {
@ -127,7 +122,7 @@ public class BusinessController {
@ApiOperation(value = "审批记录")
@PostMapping(value = "/approvalHistory")
public AjaxResult approvalHistory(@RequestBody RequestEntity entity) {
return flowTaskUtils.approvalHistory(entity);
return flowTaskUtils.approvalHistory(entity);
}
@ -137,7 +132,7 @@ public class BusinessController {
if (StringUtils.isEmpty(entity.getTaskId())) {
return AjaxResult.error("任务id不能为空");
}
return AjaxResult.success(businessService.approvalHistoryUser(entity.getTaskId()));
return AjaxResult.success(businessService.approvalHistoryUser(entity.getTaskId()));
}

View File

@ -22,7 +22,6 @@ public class CheckComment {
private String status;
private String examType;
private String sort;
private Integer agree;
private String agree;

View File

@ -911,7 +911,7 @@ public class FlowTaskUtils extends FlowServiceFactory {
tempList.add(checkComment);
sortList.add(checkComment.getSort());
}
// checkComment.setStatus(StringUtils.isBlank(time) ? "未审核" : "已审核");
checkComment.setStatus(StringUtils.isBlank(time) ? "未审核" : "已审核");
}
List<CheckComment> newList = new ArrayList<>();
sortList.forEach(sort -> {

View File

@ -406,11 +406,8 @@
from (select pcc.user_id as userId,
pcc.comment as reason,
IFNULL(pcc.reject,'') as turnDownReason,
case when pcc.agree = '1' then '审核通过'
when pcc.agree = '2' then '审核驳回'
when pcc.agree = '3' then '终审通过'
when pcc.agree = '4' then '已撤回'
else '' end as status
pcc.create_time as time,
'已审核' as status
from nxdt_ii.pt_check_comment pcc
where proc_inst_id = #{processInstanceId}) a
left join (select user_name as userName, nick_name as name, user_id as userId, dept_id as deptId
@ -513,11 +510,6 @@
IFNULL( d.time, '' ) AS time,
IFNULL( c.examType, '' ) AS examType,
IFNULL( e.`name`, '' ) AS `name`,
case when d.agree = '1' then '审核通过'
when d.agree = '2' then '审核驳回'
when d.agree = '3' then '终审通过'
when d.agree = '4' then '已撤回'
else '' end as status,
IFNULL( f.dept_name, '' ) AS section,
IFNULL( c.sort, '' ) AS sort,
#{taskId} as taskId
@ -536,7 +528,6 @@
user_id,
`comment`,
reject,
b.agree,
create_time AS time
FROM
(

View File

@ -299,7 +299,7 @@ public class AdmissionRequestController extends BaseController {
try{
int code = arService.judgeIsFileComplete(bean);
if (code > 0) {
return error("部分人员文件不存在,请先仔细核对,上传相关文件!");
return success("部分人员文件不存在,请先仔细核对,上传相关文件!");
}else{
return success();
}

View File

@ -9,7 +9,6 @@ import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.project.domain.SupervisionUnit;
import com.bonus.project.domain.SupervisionOfAdmission;
import com.bonus.project.domain.SupervisorPerson;
import com.bonus.project.service.SupervisionUnitService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -217,16 +216,6 @@ public class SupervisionUnitController extends BaseController {
}
return error("系统异常,请联系管理员");
}
@PostMapping("/delSupervisoryPersonApply")
@SysLog(title = "监理管理", businessType = OperaType.INSERT,logType = 0,module = "监理管理->监理入场-监理人员删除",details = "监理入场-监理人员删除")
public AjaxResult delSupervisoryPersonApply(@RequestBody SupervisorPerson supervisorPerson) {
try{
return toAjax(suService.delSupervisoryPersonApply(supervisorPerson));
}catch (Exception e){
logger.error(e.toString(),e);
}
return error("系统异常,请联系管理员");
}
/**
* 监理入场申请

View File

@ -168,8 +168,4 @@ public interface SupervisionUnitMapper {
* @return
*/
int getUserMapper(Long id);
Integer delUser(SupervisorPerson supervisorPerson);
Integer delPtSupPerson(SupervisorPerson supervisorPerson);
}

View File

@ -3,7 +3,6 @@ package com.bonus.project.service;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.project.domain.SupervisionUnit;
import com.bonus.project.domain.SupervisionOfAdmission;
import com.bonus.project.domain.SupervisorPerson;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
@ -86,6 +85,4 @@ public interface SupervisionUnitService {
* @return
*/
AjaxResult delSupervisionUnitUser(Long[] addressId);
int delSupervisoryPersonApply(SupervisorPerson supervisorPerson);
}

View File

@ -56,7 +56,6 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
public List<SupervisionUnit> listSupervisionUnit(SupervisionUnit bean) {
return suMapper.listSupervisionUnit(bean);
}
/**
* 获取监理单位列表
*
@ -67,7 +66,6 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
public List<SupervisionUnit> listSupervisionUnitUser(SupervisionUnit bean) {
return suMapper.listSupervisionUnitUser(bean);
}
/**
* 修改监理单位管理
*
@ -76,14 +74,14 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
*/
@Override
public AjaxResult updateSupervisionUnit(SupervisionUnit bean) {
int isActive = suMapper.getUnitNameById(bean);
if (isActive > 0) {
return AjaxResult.error("监理单位名称已存在");
}
int num = suMapper.updateSupervisionUnit(bean);
if (num > 0) {
return AjaxResult.success("修改成功");
}
int isActive= suMapper.getUnitNameById(bean);
if(isActive>0){
return AjaxResult.error("监理单位名称已存在");
}
int num= suMapper.updateSupervisionUnit(bean);
if(num>0){
return AjaxResult.success("修改成功");
}
return AjaxResult.error("修改失败");
}
@ -100,20 +98,22 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
if (StringUtils.isNotEmpty(list)) {
return AjaxResult.success(list.get(0).getSupervisorUnit() + "存在工程信息,不允许删除");
}
int userNum = suMapper.getUserMapper(id);
if (userNum > 0) {
int userNum=suMapper.getUserMapper(id);
if(userNum>0){
return AjaxResult.success(list.get(0).getSupervisorUnit() + "该监理下存在总监,不允许删除");
}
}
int num = suMapper.deleteSupervisionUnitById(addressId);
if (num > 0) {
return AjaxResult.success("删除成功");
}
return AjaxResult.error("删除失败");
int num= suMapper.deleteSupervisionUnitById(addressId);
if(num>0){
return AjaxResult.success("删除成功");
}
return AjaxResult.error("删除失败");
}
/**
* 获取监理入场列表
*
@ -178,14 +178,14 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
bean.setCreateTime(DateUtils.getDate());
bean.setCreateUser(String.valueOf(SecurityUtils.getUserId()));
String ids = jsonObject.optString("id");
if (StringUtils.isNotEmpty(ids)) {
if(StringUtils.isNotEmpty(ids)){
bean.setId(Integer.valueOf(ids));
}
String delFileIds = jsonObject.optString("delFileIds");
if (StringUtils.isNotEmpty(delFileIds)) {
if (StringUtils.isNotEmpty(delFileIds)){
commonMapper.deleteFile(delFileIds);
}
if ("".equals(jsonObject.optString("id"))) {
if("".equals(jsonObject.optString("id"))){
code = suMapper.insertPersonEnterInfo(bean);
if (code == 0) {
throw new Exception("新增监理人员入场申请失败");
@ -197,7 +197,7 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
if (code == 0) {
throw new Exception("新增人员工程关联申请失败");
}
} else {
}else{
bean.setUuid(jsonObject.optString("uuid"));
uuid = bean.getUuid();
code = suMapper.updatePersonEnterInfo(bean);
@ -263,15 +263,13 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
}
return code;
}
/**
* 监理入场申请
*
* @param enterpriseQualificationFiles 企业资质文件
* @param securityAgreementFiles 安全协议文件
* @param supervisionPlanningFiles 监理规划文件
* @param implementationRulesFiles 实施细则文件
* @param allRequestParams 参数
* @param securityAgreementFiles 安全协议文件
* @param supervisionPlanningFiles 监理规划文件
* @param implementationRulesFiles 实施细则文件
* @param allRequestParams 参数
* @return 是否新增成功
*/
@Override
@ -289,14 +287,14 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
bean.setSupUuid(jsonObject.optString("supUuid"));
bean.setUuid(jsonObject.optString("uuid"));
String delFileIds = jsonObject.optString("delFileIds");
if (StringUtils.isNotEmpty(delFileIds)) {
if (StringUtils.isNotEmpty(delFileIds)){
commonMapper.deleteFile(delFileIds);
}
bean.setCreateUser(String.valueOf(SecurityUtils.getUserId()));
String submitType = jsonObject.optString("submitType");
if (StaticVariableUtils.SUBMIT.equals(submitType)) {
bean.setStatus("8");
} else {
}else{
bean.setStatus("9");
}
code = suMapper.updateLinkRelation(bean);
@ -373,67 +371,48 @@ public class SupervisionUnitServiceImpl implements SupervisionUnitService {
/**
* 修改监理单位人员
*
* @param bean
* @return
*/
@Override
public AjaxResult updateSupervisionUnitUser(SupervisionUnit bean) {
try {
int num = suMapper.updateUnitUser(bean);
if (num > 0) {
try{
int num=suMapper.updateUnitUser(bean);
if(num>0){
suMapper.updateUserInfo(bean);
suMapper.updateProUserInfo(bean);
return AjaxResult.success("修改成功");
return AjaxResult.success("修改成功");
}
} catch (Exception e) {
log.error(e.toString(), e);
}catch (Exception e){
log.error(e.toString(),e);
}
return AjaxResult.error("修改失败");
return AjaxResult.error("修改失败");
}
/**
* 删除监理人员数据
*
* @param addressId
* @return
*/
@Override
public AjaxResult delSupervisionUnitUser(Long[] addressId) {
if (addressId.length > 0) {
for (Long id : addressId) {
if(addressId.length>0){
for (Long id:addressId){
List<Project> list = suMapper.getSupProUserNum(id);
if (StringUtils.isNotEmpty(list)) {
return AjaxResult.success(list.get(0).getSupervisorUnit() + "存在工程信息,不允许删除");
if(StringUtils.isNotEmpty(list)){
return AjaxResult.error(list.get(0).getSupervisorUnit()+"存在工程信息,不允许删除");
}
}
}
int num = suMapper.delSupervisionUnitUser(addressId);
if (num > 0) {
return AjaxResult.success("删除成功");
int num= suMapper.delSupervisionUnitUser(addressId);
if(num>0){
return AjaxResult.success("删除成功");
}
return AjaxResult.error("删除失败");
return AjaxResult.error("删除失败");
}
@Override
@Transactional(rollbackFor = Exception.class)
public int delSupervisoryPersonApply(SupervisorPerson supervisorPerson) {
// 删除监理人员信息(user表)
Integer i = suMapper.delUser(supervisorPerson);
if (i > 0) {
Integer i1 = suMapper.delPtSupPerson(supervisorPerson);
if (i1 > 0) {
return suMapper.delPtSupPerson(supervisorPerson);
} else {
throw new RuntimeException("删除失败");
}
} else {
throw new RuntimeException("删除失败");
}
}
private int qualificationMaterialsFile(@NotNull String filePath, int proId,
long fileSize, String fromType,
String informationType, String uuid) {

View File

@ -100,12 +100,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{addressId}
</foreach>
</delete>
<delete id="delUser">
delete from sys_user where id_card = #{idCard} and phonenumber = #{phone} and del_flag = '0'
</delete>
<delete id="delPtSupPerson">
delete from pt_sup_person where id_card = #{idCard} and phonen = #{phone} and is_active = '1'
</delete>
<select id="listSupervisionUnit" resultType="com.bonus.project.domain.SupervisionUnit">
select (@rowNum := @rowNum + 1) as exportId,