注释优化调整

This commit is contained in:
syruan 2026-01-08 13:42:58 +08:00
parent a843c48b07
commit bfaf3de88e
3 changed files with 82 additions and 88 deletions

View File

@ -542,7 +542,7 @@ public class BackChangeServiceImpl implements BackChangeService {
} }
} }
//如果有需要维修的设备 //如果有需要维修的设备
if (toBeRepairList.size() > 0) { if (!toBeRepairList.isEmpty()) {
//创建维修任务 //创建维修任务
String userName = SecurityUtils.getLoginUser().getSysUser().getNickName(); String userName = SecurityUtils.getLoginUser().getSysUser().getNickName();
Long changeId = addRepairTask(userName); Long changeId = addRepairTask(userName);
@ -589,8 +589,8 @@ public class BackChangeServiceImpl implements BackChangeService {
/** /**
* 生成维修任务编号 * 生成维修任务编号
* *
* @param thisMonthMaxOrder * @param thisMonthMaxOrder 本月最大序号
* @return * @return String 任务编码
*/ */
private String genderRepairTaskCode(int thisMonthMaxOrder) { private String genderRepairTaskCode(int thisMonthMaxOrder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

View File

@ -47,7 +47,7 @@ public class ToolLedgerServiceImpl implements ToolLedgerService {
// entity.setCompanyId(deptId); // entity.setCompanyId(deptId);
// } // }
if(ADMIN_ID.equals(userId)){ if(ADMIN_ID.equals(userId)){
entity.setCompanyId(1L); entity.setCompanyId(null);
}else{ }else{
entity.setCompanyId(deptId); entity.setCompanyId(deptId);
} }
@ -64,15 +64,10 @@ public class ToolLedgerServiceImpl implements ToolLedgerService {
public List<ToolLedgerEntity> listCode(ToolLedgerEntity entity) { public List<ToolLedgerEntity> listCode(ToolLedgerEntity entity) {
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId(); Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
Long userId = SecurityUtils.getLoginUser().getUserid(); Long userId = SecurityUtils.getLoginUser().getUserid();
// 管理员和省公司可查看所有数据 if (ADMIN_ID.equals(userId)) {
// if (userId != null && deptId != null // 管理员可查看所有数据
// && !userId.equals(ADMIN_ID) entity.setCompanyId(null);
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) { } else {
// entity.setCompanyId(deptId);
// }
if(ADMIN_ID.equals(userId)){
entity.setCompanyId(1L);
}else{
entity.setCompanyId(deptId); entity.setCompanyId(deptId);
} }
List<ToolLedgerEntity> toolLedgerEntities = mapper.listCode(entity); List<ToolLedgerEntity> toolLedgerEntities = mapper.listCode(entity);

View File

@ -234,7 +234,6 @@
AND tl.tool_code LIKE CONCAT('%', #{toolCode}, '%') AND tl.tool_code LIKE CONCAT('%', #{toolCode}, '%')
</if> </if>
<if test="companyId != null and companyId != 1 "> <if test="companyId != null and companyId != 1 ">
<!-- AND (tl.company_id = #{companyId} OR tl.company_id IS NULL)-->
and tl.company_id in ( and tl.company_id in (
select dept_id from sys_dept where dept_id= #{companyId} select dept_id from sys_dept where dept_id= #{companyId}
union union