2022年9月9日

pull/1/head
litao 4 years ago
parent b295772a2e
commit b07ae8eb93
  1. 8
      lab-service-api/lab-lims-api/src/main/java/org/springblade/lims/entry/ExamineResult.java
  2. 29
      lab-service/lab-capital/src/main/java/org/springblade/lims/goods/controller/ApplyController.java
  3. 62
      lab-service/lab-capital/src/main/java/org/springblade/lims/goods/controller/GoodsController.java
  4. 4
      lab-service/lab-capital/src/main/java/org/springblade/lims/goods/controller/ReportController.java
  5. 18
      lab-service/lab-lims/src/main/java/org/springblade/lims/controller/EntrustController.java
  6. 4
      lab-service/lab-lims/src/main/java/org/springblade/lims/controller/ExamineResultController.java
  7. 4
      lab-service/lab-lims/src/main/java/org/springblade/lims/service/impl/EntrustServiceImpl.java
  8. 8
      lab-service/lab-user/src/main/java/org/springblade/system/user/controller/TrainController.java
  9. 2
      lab-service/lab-user/src/main/java/org/springblade/system/user/service/impl/TrainServiceImpl.java

@ -44,14 +44,14 @@ public class ExamineResult extends BaseEntity implements Serializable {
private String simpleStatus; private String simpleStatus;
/** /**
* 填写后的操作程序内容 * 温度
*/ */
private String temperature; private Integer temperature;
/** /**
* 填写后的操作程序内容 * 湿度
*/ */
private String humidity; private Integer humidity;
private String examineDataArr; private String examineDataArr;

@ -155,6 +155,7 @@ public class ApplyController extends BladeController {
apply.setCode("编码格式待定"); apply.setCode("编码格式待定");
apply.setApplyTypeNum(applyVO.getDetailList().size()); apply.setApplyTypeNum(applyVO.getDetailList().size());
// 如果不需要审批,直接改为待出库 // 如果不需要审批,直接改为待出库
List<User> userList = userClient.listDeptUserByCurrentUser(AuthUtil.getDeptId()).getData();
if ("0".equals(isApproval)) { if ("0".equals(isApproval)) {
apply.setApproveTime(new Date()); apply.setApproveTime(new Date());
R<User> userR = userClient.userInfoById(apply.getApproveUserId()); R<User> userR = userClient.userInfoById(apply.getApproveUserId());
@ -162,20 +163,30 @@ public class ApplyController extends BladeController {
apply.setApproveUser(userR.getData().getName()); apply.setApproveUser(userR.getData().getName());
} }
apply.setStatus(1); apply.setStatus(1);
// 消息通知
if (userList != null) {
for (User user : userList) {
if ("1542095624162525185".equals(user.getRoleId())) {
messageClient.event(SysTypeEnum.INFORM.getValue(), "申领抄送",
"你有新的申领单审核已通过,请查看", 1, 5, user.getId().toString(), "/capital/shenlingList");
}
}
}
messageClient.event(SysTypeEnum.INFORM.getValue(), "申领出库",
"你有新的申领单待出库,请及时处理", 1, 5, "1533753689484058625", "/capital/shenlingList");
} else { } else {
apply.setStatus(0); apply.setStatus(0);
} // 消息通知
applyService.save(apply); if (userList != null) {
// 消息通知 for (User user : userList) {
List<User> userList = userClient.listDeptUserByCurrentUser(AuthUtil.getDeptId()).getData(); if ("1542095624162525185".equals(user.getRoleId())) {
if (userList != null) { messageClient.event(SysTypeEnum.INFORM.getValue(), "申领审核",
for (User user : userList) { "你有新的申领单待审核,请及时处理", 1, 5, user.getId().toString(), "/capital/shenlingList");
if ("1542095624162525185".equals(user.getRoleId())) { }
messageClient.event(SysTypeEnum.INFORM.getValue(), "申领审核",
"你有新的申领单待审核,请及时处理", 1, 5, user.getId().toString(), "/capital/shenlingList");
} }
} }
} }
applyService.save(apply);
//添加申领明细表 //添加申领明细表
List<ApplyDetail> detailList = applyVO.getDetailList(); List<ApplyDetail> detailList = applyVO.getDetailList();

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.sun.xml.internal.ws.resources.UtilMessages;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -574,38 +575,51 @@ public class GoodsController extends BladeController {
* 出入库记录查询 * 出入库记录查询
*/ */
@GetMapping("/inAndOutRecord") @GetMapping("/inAndOutRecord")
public R<IPage> inAndOutRecord(String id, Query query) { public R<IPage> inAndOutRecord(String id, Query query, String type, Date startTime, Date endTime) {
List<InAndOutRecord> inAndOutRecordList = new ArrayList<>(); List<InAndOutRecord> inAndOutRecordList = new ArrayList<>();
// 物品出库信息 // 物品出库信息
LambdaQueryWrapper<ApplyDetail> wrapper = new LambdaQueryWrapper<>(); if (!"2".equals(type)) {
wrapper.eq(ApplyDetail::getProductId, id); LambdaQueryWrapper<ApplyDetail> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ApplyDetail::getIsCk, 1); wrapper.eq(ApplyDetail::getProductId, id);
List<ApplyDetail> applyDetailList = applyDetailService.list(wrapper); wrapper.eq(ApplyDetail::getIsCk, 1);
if (CollectionUtils.isNotEmpty(applyDetailList)) { if (startTime != null && endTime != null) {
for (ApplyDetail applyDetail : applyDetailList) { wrapper.between(ApplyDetail::getCkTime, startTime, endTime);
InAndOutRecord inAndOutRecord = new InAndOutRecord(); }
inAndOutRecord.setGoodsName(applyDetail.getProductName()); List<ApplyDetail> applyDetailList = applyDetailService.list(wrapper);
inAndOutRecord.setType("出库"); if (CollectionUtils.isNotEmpty(applyDetailList)) {
inAndOutRecord.setNum(applyDetail.getOutNum()); for (ApplyDetail applyDetail : applyDetailList) {
inAndOutRecord.setTime(applyDetail.getCkTime()); InAndOutRecord inAndOutRecord = new InAndOutRecord();
inAndOutRecordList.add(inAndOutRecord); inAndOutRecord.setGoodsName(applyDetail.getProductName());
inAndOutRecord.setType("出库");
inAndOutRecord.setNum(applyDetail.getOutNum());
inAndOutRecord.setTime(applyDetail.getCkTime());
inAndOutRecordList.add(inAndOutRecord);
}
} }
} }
// 物品入库信息 // 物品入库信息
LambdaQueryWrapper<ProductStoreDetial> queryWrapper = new LambdaQueryWrapper<>(); if (!"1".equals(type)) {
queryWrapper.eq(ProductStoreDetial::getGoodsId, id); LambdaQueryWrapper<ProductStoreDetial> queryWrapper = new LambdaQueryWrapper<>();
List<ProductStoreDetial> detialList = productStoreDetialService.list(queryWrapper); queryWrapper.eq(ProductStoreDetial::getGoodsId, id);
if (CollectionUtils.isNotEmpty(detialList)) { if (startTime != null && endTime != null) {
for (ProductStoreDetial productStoreDetial : detialList) { queryWrapper.between(ProductStoreDetial::getCreateTime, startTime, endTime);
InAndOutRecord inAndOutRecord = new InAndOutRecord(); }
inAndOutRecord.setGoodsName(productStoreDetial.getGoodsName()); List<ProductStoreDetial> detialList = productStoreDetialService.list(queryWrapper);
inAndOutRecord.setType("入库"); if (CollectionUtils.isNotEmpty(detialList)) {
inAndOutRecord.setNum(productStoreDetial.getNum()); for (ProductStoreDetial productStoreDetial : detialList) {
inAndOutRecord.setTime(productStoreDetial.getCreateTime()); InAndOutRecord inAndOutRecord = new InAndOutRecord();
inAndOutRecordList.add(inAndOutRecord); inAndOutRecord.setGoodsName(productStoreDetial.getGoodsName());
inAndOutRecord.setType("入库");
inAndOutRecord.setNum(productStoreDetial.getNum());
inAndOutRecord.setTime(productStoreDetial.getCreateTime());
inAndOutRecordList.add(inAndOutRecord);
}
} }
} }
// 组装过滤生成page对象
List<InAndOutRecord> inAndOutRecords = inAndOutRecordList.stream().sorted(Comparator.comparing(InAndOutRecord::getTime, Comparator.reverseOrder())).collect(toList()); List<InAndOutRecord> inAndOutRecords = inAndOutRecordList.stream().sorted(Comparator.comparing(InAndOutRecord::getTime, Comparator.reverseOrder())).collect(toList());
IPage<InAndOutRecord> page = new Page<>(); IPage<InAndOutRecord> page = new Page<>();
List<InAndOutRecord> collect = inAndOutRecords.stream().skip((query.getCurrent() - 1) * query.getSize()).limit(query.getSize()).collect(toList()); List<InAndOutRecord> collect = inAndOutRecords.stream().skip((query.getCurrent() - 1) * query.getSize()).limit(query.getSize()).collect(toList());

@ -32,14 +32,14 @@ public class ReportController extends BladeController {
// 分页 报损信息 // 分页 报损信息
@GetMapping("/list") @GetMapping("/list")
public IPage<Report> list(Report report, Query query) { public R<IPage<Report>> list(Report report, Query query) {
LambdaQueryWrapper<Report> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Report> wrapper = new LambdaQueryWrapper<>();
//根据物品名称模糊查询 //根据物品名称模糊查询
if (StringUtil.isNoneBlank(report.getReportGoodsName())) { if (StringUtil.isNoneBlank(report.getReportGoodsName())) {
wrapper.like(Report::getReportGoodsName, report.getReportGoodsName()); wrapper.like(Report::getReportGoodsName, report.getReportGoodsName());
} }
wrapper.orderByDesc(Report::getCreateTime); wrapper.orderByDesc(Report::getCreateTime);
return reportService.page(Condition.getPage(query), wrapper); return R.data(reportService.page(Condition.getPage(query), wrapper));
} }
/** /**

@ -1037,11 +1037,17 @@ public class EntrustController extends BladeController {
} }
String instrumentId = examineResult.getInstrumentId(); String instrumentId = examineResult.getInstrumentId();
if (instrumentId != null) { if (instrumentId != null) {
Instrument instrument = instrumentService.getById(instrumentId); String name = "";
if (instrument != null) { String[] split = instrumentId.split(",");
examineResult.setInstrumentName(instrument.getName()); for (int i = 0; i < split.length; i++) {
examineResult.setInstrumentNo(instrument.getCode()); Instrument instrument = instrumentService.getById(split[i]);
if (i == split.length - 1) {
name += instrument.getName() + "-" + instrument.getCode();
} else {
name += instrument.getName() + "-" + instrument.getCode() + ",";
}
} }
examineResult.setInstrumentName(name);
} }
List<String> path = new ArrayList<>(); List<String> path = new ArrayList<>();
String picturePath = examineResult.getPicturePath(); String picturePath = examineResult.getPicturePath();
@ -1614,9 +1620,5 @@ public class EntrustController extends BladeController {
return entrust; return entrust;
} }
@GetMapping("/ceshi")
public void ceshi() {
}
} }

@ -43,10 +43,6 @@ public class ExamineResultController extends BladeController {
private final IExamineItemService examineItemService; private final IExamineItemService examineItemService;
private final ISysClient sysClient;
private final ISimpleService simpleService;
/** /**
* 分页 * 分页
*/ */

@ -1017,8 +1017,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
} }
} }
result.put("9", instrumentName); result.put("9", instrumentName);
String value = DictBizCache.getValue(DictBizEnum.SIMPLE_STATUS, examineResult.getSimpleStatus()); // String value = DictBizCache.getValue(DictBizEnum.SIMPLE_STATUS, examineResult.getSimpleStatus());
result.put("10", value); result.put("10", examineResult.getSimpleStatus());
result.put("11", "温度" + examineResult.getTemperature() + "℃; " + "湿度" + examineResult.getHumidity() + "%RH"); result.put("11", "温度" + examineResult.getTemperature() + "℃; " + "湿度" + examineResult.getHumidity() + "%RH");
// result.put("12", examineWay.getOperation()); // result.put("12", examineWay.getOperation());
result.put("12", examineResult.getOperateContent()); result.put("12", examineResult.getOperateContent());

@ -160,4 +160,12 @@ public class TrainController extends BladeController {
trainService.evaluateSubmit(train); trainService.evaluateSubmit(train);
} }
/**
* 培训审核
*/
@PostMapping("/approval")
public R approval(@RequestBody Train train) {
return R.status(trainService.updateById(train));
}
} }

@ -52,7 +52,7 @@ public class TrainServiceImpl extends BaseServiceImpl<TrainMapper, Train> implem
train.setTeacherName(user1.getName()); train.setTeacherName(user1.getName());
String[] split = train.getTrainPerson().split(","); String[] split = train.getTrainPerson().split(",");
train.setNum(split.length); train.setNum(split.length);
train.setStatus(0); train.setStatus(-1);
this.save(train); this.save(train);
// 参训人员入库 // 参训人员入库
if (train.getTrainPerson() != null && !"".equals(train.getTrainPerson())) { if (train.getTrainPerson() != null && !"".equals(train.getTrainPerson())) {

Loading…
Cancel
Save