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 temperature;
private Integer temperature;
/**
* 填写后的操作程序内容
* 湿度
*/
private String humidity;
private Integer humidity;
private String examineDataArr;

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

@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.sun.xml.internal.ws.resources.UtilMessages;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
@ -574,38 +575,51 @@ public class GoodsController extends BladeController {
* 出入库记录查询
*/
@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<>();
// 物品出库信息
LambdaQueryWrapper<ApplyDetail> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ApplyDetail::getProductId, id);
wrapper.eq(ApplyDetail::getIsCk, 1);
List<ApplyDetail> applyDetailList = applyDetailService.list(wrapper);
if (CollectionUtils.isNotEmpty(applyDetailList)) {
for (ApplyDetail applyDetail : applyDetailList) {
InAndOutRecord inAndOutRecord = new InAndOutRecord();
inAndOutRecord.setGoodsName(applyDetail.getProductName());
inAndOutRecord.setType("出库");
inAndOutRecord.setNum(applyDetail.getOutNum());
inAndOutRecord.setTime(applyDetail.getCkTime());
inAndOutRecordList.add(inAndOutRecord);
if (!"2".equals(type)) {
LambdaQueryWrapper<ApplyDetail> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ApplyDetail::getProductId, id);
wrapper.eq(ApplyDetail::getIsCk, 1);
if (startTime != null && endTime != null) {
wrapper.between(ApplyDetail::getCkTime, startTime, endTime);
}
List<ApplyDetail> applyDetailList = applyDetailService.list(wrapper);
if (CollectionUtils.isNotEmpty(applyDetailList)) {
for (ApplyDetail applyDetail : applyDetailList) {
InAndOutRecord inAndOutRecord = new InAndOutRecord();
inAndOutRecord.setGoodsName(applyDetail.getProductName());
inAndOutRecord.setType("出库");
inAndOutRecord.setNum(applyDetail.getOutNum());
inAndOutRecord.setTime(applyDetail.getCkTime());
inAndOutRecordList.add(inAndOutRecord);
}
}
}
// 物品入库信息
LambdaQueryWrapper<ProductStoreDetial> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ProductStoreDetial::getGoodsId, id);
List<ProductStoreDetial> detialList = productStoreDetialService.list(queryWrapper);
if (CollectionUtils.isNotEmpty(detialList)) {
for (ProductStoreDetial productStoreDetial : detialList) {
InAndOutRecord inAndOutRecord = new InAndOutRecord();
inAndOutRecord.setGoodsName(productStoreDetial.getGoodsName());
inAndOutRecord.setType("入库");
inAndOutRecord.setNum(productStoreDetial.getNum());
inAndOutRecord.setTime(productStoreDetial.getCreateTime());
inAndOutRecordList.add(inAndOutRecord);
if (!"1".equals(type)) {
LambdaQueryWrapper<ProductStoreDetial> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ProductStoreDetial::getGoodsId, id);
if (startTime != null && endTime != null) {
queryWrapper.between(ProductStoreDetial::getCreateTime, startTime, endTime);
}
List<ProductStoreDetial> detialList = productStoreDetialService.list(queryWrapper);
if (CollectionUtils.isNotEmpty(detialList)) {
for (ProductStoreDetial productStoreDetial : detialList) {
InAndOutRecord inAndOutRecord = new 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());
IPage<InAndOutRecord> page = new Page<>();
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")
public IPage<Report> list(Report report, Query query) {
public R<IPage<Report>> list(Report report, Query query) {
LambdaQueryWrapper<Report> wrapper = new LambdaQueryWrapper<>();
//根据物品名称模糊查询
if (StringUtil.isNoneBlank(report.getReportGoodsName())) {
wrapper.like(Report::getReportGoodsName, report.getReportGoodsName());
}
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();
if (instrumentId != null) {
Instrument instrument = instrumentService.getById(instrumentId);
if (instrument != null) {
examineResult.setInstrumentName(instrument.getName());
examineResult.setInstrumentNo(instrument.getCode());
String name = "";
String[] split = instrumentId.split(",");
for (int i = 0; i < split.length; i++) {
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<>();
String picturePath = examineResult.getPicturePath();
@ -1614,9 +1620,5 @@ public class EntrustController extends BladeController {
return entrust;
}
@GetMapping("/ceshi")
public void ceshi() {
}
}

@ -43,10 +43,6 @@ public class ExamineResultController extends BladeController {
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);
String value = DictBizCache.getValue(DictBizEnum.SIMPLE_STATUS, examineResult.getSimpleStatus());
result.put("10", value);
// String value = DictBizCache.getValue(DictBizEnum.SIMPLE_STATUS, examineResult.getSimpleStatus());
result.put("10", examineResult.getSimpleStatus());
result.put("11", "温度" + examineResult.getTemperature() + "℃; " + "湿度" + examineResult.getHumidity() + "%RH");
// result.put("12", examineWay.getOperation());
result.put("12", examineResult.getOperateContent());

@ -160,4 +160,12 @@ public class TrainController extends BladeController {
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());
String[] split = train.getTrainPerson().split(",");
train.setNum(split.length);
train.setStatus(0);
train.setStatus(-1);
this.save(train);
// 参训人员入库
if (train.getTrainPerson() != null && !"".equals(train.getTrainPerson())) {

Loading…
Cancel
Save