From fe70c92210e98d25cb892eb1e4d8369d5f0a5b53 Mon Sep 17 00:00:00 2001 From: 15856 <15856818120@163.com> Date: Fri, 14 Jun 2024 13:48:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E4=BB=BB=E5=8A=A1=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E5=AF=B9=E9=A2=86=E6=96=99=E5=92=8C=E9=80=80=E6=96=99=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E4=BA=BA=E8=BF=9B=E8=A1=8C=E7=BB=9F=E4=B8=80=E5=AD=98?= =?UTF-8?q?userId=EF=BC=8C=E5=AF=B9=E4=BB=A5=E5=89=8D=E7=9A=84=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E8=BF=9B=E8=A1=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/sgzb/app/service/impl/TmTaskServiceImpl.java | 2 ++ .../src/main/resources/mapper/app/TmTaskMapper.xml | 8 ++++---- .../sgzb/material/controller/BackApplyController.java | 2 ++ .../com/bonus/sgzb/material/domain/BackApplyInfo.java | 4 +++- .../sgzb/material/service/impl/BackApplyServiceImpl.java | 6 ++++-- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index a061b7ce..8385f738 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -1093,6 +1093,8 @@ public class TmTaskServiceImpl implements TmTaskService { @Override public int insertSelective(TmTask record) { + //2024.06.14统一创建人存userId + record.setCreateBy(record.getUserId()); return tmTaskMapper.insertSelective(record); } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml index e31e0935..efb6bb48 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml @@ -535,7 +535,7 @@ tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName, bpl.lot_id as proId,bpl.lot_name as proName, bui.unit_id as unitId,bui.unit_name as unitName, - lai.lease_person as leasePerson, lai.phone as leasePhone,lai.lease_type as leaseType, lai.estimate_lease_time as estimateLeaseTime,tt.create_by as applyFor,d.`name` as taskName, + lai.lease_person as leasePerson, lai.phone as leasePhone,lai.lease_type as leaseType, lai.estimate_lease_time as estimateLeaseTime,su.user_name as applyFor,d.`name` as taskName, case when d.id = '31' then lai.company_audit_remark when d.id = '32' then lai.dept_audit_remark when d.id = '33' then lai.direct_audit_remark @@ -548,7 +548,7 @@ tt.create_time as createTimes, tt.update_time as updateTimes FROM tm_task tt - LEFT JOIN sys_user su ON tt.create_by = su.user_name + LEFT JOIN sys_user su ON tt.create_by = su.user_id LEFT JOIN sys_dept sd ON su.dept_id = sd.dept_id LEFT JOIN tm_task_agreement tta ON tt.task_id = tta.task_id LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id @@ -943,7 +943,7 @@ tt.*, su.phonenumber AS phoneNumber, sd.dept_name as deptName,su.nick_name as nickName,su.user_id as userId, bpl.lot_id as proId,bpl.lot_name as proName, bui.unit_id as unitId,bui.unit_name as unitName, - lai.lease_person as leasePerson, lai.phone as leasePhone, tt.create_by as applyFor,d.`name` as taskName,lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime, + lai.lease_person as leasePerson, lai.phone as leasePhone, su.user_name as applyFor,d.`name` as taskName,lai.lease_type as leaseType,lai.estimate_lease_time as estimateLeaseTime, case when d.id = '31' then lai.company_audit_remark when d.id = '32' then lai.dept_audit_remark when d.id = '33' then lai.direct_audit_remark @@ -956,7 +956,7 @@ tt.create_time as createTimes, tt.update_time as updateTimes FROM tm_task tt - LEFT JOIN sys_user su ON tt.create_by = su.user_name + LEFT JOIN sys_user su ON tt.create_by = su.user_id LEFT JOIN sys_dept sd ON su.dept_id = sd.dept_id LEFT JOIN tm_task_agreement tta ON tt.task_id = tta.task_id LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java index 5d0c6745..60bf20d1 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/BackApplyController.java @@ -193,6 +193,8 @@ public class BackApplyController extends BaseController { BackApplyInfo backApplyInfo1 = leaseApplyDetailsList.get(0); // 对领料任务表的对象做数据处理 BackApplyInfo backApplyInfo = bean.getBackApplyInfo(); + //创建人 + backApplyInfo.setCreateBy(bean.getUserId()); /* 创建领料单号*/ backApplyInfo.setCode(code); /*设置任务ID*/ diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackApplyInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackApplyInfo.java index 5d6f022d..480faef6 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackApplyInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/BackApplyInfo.java @@ -251,5 +251,7 @@ public class BackApplyInfo extends BaseEntity { private String time; private int viewWeb; - + /** 创建者 */ + @ApiModelProperty(value = "创建者Id") + private String userId; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java index e966e19c..71b7a4cc 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java @@ -46,8 +46,8 @@ public class BackApplyServiceImpl implements BackApplyService { return backApplyMapper.getBackApplyList(bean); } else { //个人只能看到自己的申请的退料 - String username = SecurityUtils.getLoginUser().getUsername(); - bean.setCreateBy(username); + String userId = SecurityUtils.getLoginUser().getUserid().toString(); + bean.setCreateBy(userId); return backApplyMapper.getBackApplyList(bean); } } @@ -112,6 +112,8 @@ public class BackApplyServiceImpl implements BackApplyService { @Override public int insertSelective(BackApplyInfo bean) { + //2024.06.14创建人统一修改为用户id + bean.setCreateBy(bean.getUserId()); return backApplyMapper.insertTask(bean); }