注释优化调整
This commit is contained in:
parent
a843c48b07
commit
bfaf3de88e
|
|
@ -542,7 +542,7 @@ public class BackChangeServiceImpl implements BackChangeService {
|
|||
}
|
||||
}
|
||||
//如果有需要维修的设备
|
||||
if (toBeRepairList.size() > 0) {
|
||||
if (!toBeRepairList.isEmpty()) {
|
||||
//创建维修任务
|
||||
String userName = SecurityUtils.getLoginUser().getSysUser().getNickName();
|
||||
Long changeId = addRepairTask(userName);
|
||||
|
|
@ -589,8 +589,8 @@ public class BackChangeServiceImpl implements BackChangeService {
|
|||
/**
|
||||
* 生成维修任务编号
|
||||
*
|
||||
* @param thisMonthMaxOrder
|
||||
* @return
|
||||
* @param thisMonthMaxOrder 本月最大序号
|
||||
* @return String 任务编码
|
||||
*/
|
||||
private String genderRepairTaskCode(int thisMonthMaxOrder) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class ToolLedgerServiceImpl implements ToolLedgerService {
|
|||
// entity.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
entity.setCompanyId(1L);
|
||||
entity.setCompanyId(null);
|
||||
}else{
|
||||
entity.setCompanyId(deptId);
|
||||
}
|
||||
|
|
@ -64,15 +64,10 @@ public class ToolLedgerServiceImpl implements ToolLedgerService {
|
|||
public List<ToolLedgerEntity> listCode(ToolLedgerEntity entity) {
|
||||
Long deptId = SecurityUtils.getLoginUser().getSysUser().getDeptId();
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 管理员和省公司可查看所有数据
|
||||
// if (userId != null && deptId != null
|
||||
// && !userId.equals(ADMIN_ID)
|
||||
// && !deptId.equals(PROVINCE_COMPANY_DEPT_ID)) {
|
||||
// entity.setCompanyId(deptId);
|
||||
// }
|
||||
if(ADMIN_ID.equals(userId)){
|
||||
entity.setCompanyId(1L);
|
||||
}else{
|
||||
if (ADMIN_ID.equals(userId)) {
|
||||
// 管理员可查看所有数据
|
||||
entity.setCompanyId(null);
|
||||
} else {
|
||||
entity.setCompanyId(deptId);
|
||||
}
|
||||
List<ToolLedgerEntity> toolLedgerEntities = mapper.listCode(entity);
|
||||
|
|
|
|||
|
|
@ -234,7 +234,6 @@
|
|||
AND tl.tool_code LIKE CONCAT('%', #{toolCode}, '%')
|
||||
</if>
|
||||
<if test="companyId != null and companyId != 1 ">
|
||||
<!-- AND (tl.company_id = #{companyId} OR tl.company_id IS NULL)-->
|
||||
and tl.company_id in (
|
||||
select dept_id from sys_dept where dept_id= #{companyId}
|
||||
union
|
||||
|
|
|
|||
Loading…
Reference in New Issue