fix
This commit is contained in:
parent
e75f0c36c8
commit
aee2086682
@ -81,17 +81,23 @@ public class EquipmentController extends AbstractController {
|
|||||||
model.setBrandId(equipmentInfo.getBrandId());
|
model.setBrandId(equipmentInfo.getBrandId());
|
||||||
model.setSpecId(equipmentInfo.getSpecsId());
|
model.setSpecId(equipmentInfo.getSpecsId());
|
||||||
|
|
||||||
Long departmentId = -1L;
|
|
||||||
if(equipmentInfo.getSaiId()!=null){
|
|
||||||
SpecialApplyInfo specialApplyInfo = specialApplyInfoService.selectSpecialApplyInfoById(equipmentInfo.getSaiId());
|
|
||||||
}
|
|
||||||
if(equipmentInfo.getUserId()!=null){
|
|
||||||
DepartmentsStaffRelateEntity entity = departmentsStaffRelateService.selectByStaffId(equipmentInfo.getUserId());
|
|
||||||
}
|
|
||||||
model.setDepartId(departmentId);
|
|
||||||
int i = tCountMapper.selectMaxNum();
|
int i = tCountMapper.selectMaxNum();
|
||||||
if(equipmentInfo.getCount()<i){
|
if(equipmentInfo.getCount()<i){
|
||||||
logger.info("第" + i + "次盘点" + code);
|
logger.info("第" + i + "次盘点" + code);
|
||||||
|
Long departmentId = -1L;
|
||||||
|
if(equipmentInfo.getSaiId()!=null){
|
||||||
|
SpecialApplyInfo specialApplyInfo = specialApplyInfoService.selectSpecialApplyInfoById(equipmentInfo.getSaiId());
|
||||||
|
if(specialApplyInfo != null){
|
||||||
|
equipmentInfo.setDepartId(Long.valueOf(specialApplyInfo.getId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(equipmentInfo.getUserId()!=null){
|
||||||
|
DepartmentsStaffRelateEntity entity = departmentsStaffRelateService.selectByStaffId(equipmentInfo.getUserId());
|
||||||
|
if(entity != null && StringUtil.isNotBlank(entity.getDepartmentId())){
|
||||||
|
equipmentInfo.setDepartId(Long.valueOf(entity.getDepartmentId()));
|
||||||
|
}
|
||||||
|
}
|
||||||
equipmentInfo.setCount(i);
|
equipmentInfo.setCount(i);
|
||||||
iEquipmentInfoService.insertEquipmentInfo(equipmentInfo);
|
iEquipmentInfoService.insertEquipmentInfo(equipmentInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -88,6 +88,4 @@ public class FindEquipmentResModel {
|
|||||||
@ApiModelProperty(value = "是否为员工使用", name = "employee")
|
@ApiModelProperty(value = "是否为员工使用", name = "employee")
|
||||||
private boolean employee = true;
|
private boolean employee = true;
|
||||||
|
|
||||||
private Long departId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,9 @@ import com.lz.common.exception.ZSException;
|
|||||||
import com.lz.common.utils.ISelect;
|
import com.lz.common.utils.ISelect;
|
||||||
import com.lz.common.utils.PageUtils;
|
import com.lz.common.utils.PageUtils;
|
||||||
import com.lz.common.utils.StringUtil;
|
import com.lz.common.utils.StringUtil;
|
||||||
|
import com.lz.modules.app.entity.DepartmentsStaffRelateEntity;
|
||||||
import com.lz.modules.app.entity.StaffEntity;
|
import com.lz.modules.app.entity.StaffEntity;
|
||||||
|
import com.lz.modules.app.service.DepartmentsStaffRelateService;
|
||||||
import com.lz.modules.app.service.StaffService;
|
import com.lz.modules.app.service.StaffService;
|
||||||
import com.lz.modules.equipment.dao.*;
|
import com.lz.modules.equipment.dao.*;
|
||||||
import com.lz.modules.equipment.entity.*;
|
import com.lz.modules.equipment.entity.*;
|
||||||
@ -56,6 +58,8 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
|
|||||||
private EquipmentSpecsMapper equipmentSpecsMapper;
|
private EquipmentSpecsMapper equipmentSpecsMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TCountMapper tCountMapper;
|
private TCountMapper tCountMapper;
|
||||||
|
@Autowired
|
||||||
|
private DepartmentsStaffRelateService departmentsStaffRelateService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -137,6 +141,10 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
|
|||||||
insert.setUser(employeesInfo.getName());
|
insert.setUser(employeesInfo.getName());
|
||||||
insert.setUserId(employeesInfo.getId());
|
insert.setUserId(employeesInfo.getId());
|
||||||
insert.setSaiId(null);
|
insert.setSaiId(null);
|
||||||
|
DepartmentsStaffRelateEntity entity = departmentsStaffRelateService.selectByStaffId(employeesInfo.getId());
|
||||||
|
if(entity != null && StringUtil.isNotBlank(entity.getDepartmentId())){
|
||||||
|
insert.setDepartId(Long.valueOf(entity.getDepartmentId()));
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
SpecialApplyInfo specialApplyInfo = specialApplyInfoMapper.selectSpecialApplyInfoById(dto.getUserId());
|
SpecialApplyInfo specialApplyInfo = specialApplyInfoMapper.selectSpecialApplyInfoById(dto.getUserId());
|
||||||
if(specialApplyInfo==null){
|
if(specialApplyInfo==null){
|
||||||
@ -145,6 +153,7 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
|
|||||||
insert.setUser(specialApplyInfo.getTypeDesc());
|
insert.setUser(specialApplyInfo.getTypeDesc());
|
||||||
insert.setSaiId(specialApplyInfo.getId());
|
insert.setSaiId(specialApplyInfo.getId());
|
||||||
insert.setUserId(null);
|
insert.setUserId(null);
|
||||||
|
insert.setDepartId(specialApplyInfo.getId());
|
||||||
}
|
}
|
||||||
insert.setCount(i);
|
insert.setCount(i);
|
||||||
equipmentInfoMapper.insert(insert);
|
equipmentInfoMapper.insert(insert);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user