This commit is contained in:
DirectionOfMind 2020-12-30 12:11:44 +08:00
parent f4d348da68
commit 005c6ea99e
3 changed files with 5 additions and 6 deletions

View File

@ -242,4 +242,5 @@ public class EquipmentController extends AbstractController {
iEquipmentFlowRecordService.insertEquipmentFlowRecord(record);
}
}

View File

@ -136,6 +136,7 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
}
insert.setUser(employeesInfo.getName());
insert.setUserId(employeesInfo.getId());
insert.setSaiId(null);
}else {
SpecialApplyInfo specialApplyInfo = specialApplyInfoMapper.selectSpecialApplyInfoById(dto.getUserId());
if(specialApplyInfo==null){
@ -143,6 +144,7 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
}
insert.setUser(specialApplyInfo.getTypeDesc());
insert.setSaiId(specialApplyInfo.getId());
insert.setUserId(null);
}
insert.setCount(i);
equipmentInfoMapper.insert(insert);
@ -157,6 +159,7 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
}
info.setUser(employeesInfo.getName());
info.setUserId(employeesInfo.getId());
info.setSaiId(null);
}else {
SpecialApplyInfo specialApplyInfo = specialApplyInfoMapper.selectSpecialApplyInfoById(dto.getUserId());
if(specialApplyInfo==null){
@ -164,11 +167,6 @@ public class EquipmentInfoServiceImpl extends ServiceImpl<EquipmentInfoMapper, E
}
info.setUser(specialApplyInfo.getTypeDesc());
info.setSaiId(specialApplyInfo.getId());
}
//根据是否员工重置其他id
if(dto.isEmployee()){
info.setSaiId(null);
}else {
info.setUserId(null);
}
info.setType(equipmentType.getType());

View File

@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@ -418,5 +419,4 @@ public class ExportController {
}