提交 9f739621 authored 作者: 邓砥奕's avatar 邓砥奕

更新

上级 7963aee4
......@@ -164,6 +164,12 @@ public class AllotBillController {
else {
AllotBill allotBill = allotBillService.getOne(taskService.get(allotBillSaveVo.getTaskId()).getBillId());
MapperUtils.copyNoNullProperties(a,allotBill);
if (a.getApplyFiles()==null||"".equals(a.getApplyFiles())){
allotBill.setApplyFiles(null);
}
if (a.getReplyFiles()==null||"".equals(a.getReplyFiles())){
allotBill.setReplyFiles(null);
}
allotBillEntity = allotBillService.update(allotBill);
}
Calendar calendar = Calendar.getInstance();
......
......@@ -103,6 +103,12 @@ public class BackController {
else {
allotBackBill = allotBackBillService.getOne(taskService.get(allotBillSaveVo.getTaskId()).getBillId());
MapperUtils.copyNoNullProperties(a,allotBackBill);
if (a.getApplyFiles()==null||"".equals(a.getApplyFiles())){
allotBackBill.setApplyFiles(null);
}
if (a.getReplyFiles()==null||"".equals(a.getReplyFiles())){
allotBackBill.setReplyFiles(null);
}
allotBackBill = allotBackBillService.update(allotBackBill);
}
Calendar calendar = Calendar.getInstance();
......
......@@ -557,4 +557,25 @@ public class DeviceApplyController {
script.getChilds().forEach(s -> addScript(scripts,s));
}
}
@ApiOperation(value = "手动办结申请任务", notes = "手动办结申请任务")
@PostMapping("/over/{id}")
@Transactional(rollbackFor = Exception.class)
public ResponseEntity over(@PathVariable("id") int taskId) {
TaskBto taskBto = taskService.get(taskId);
taskService.addInvolveUser(taskBto,userUtils.getCurrentUserId());
taskService.moveToEnd(taskBto);
DeviceApplyBill deviceApplyBill = deviceApplyBillService.getOne(taskBto.getBillId());
deviceApplyBill.setApplyStatus(2);
deviceApplyBillService.update(deviceApplyBill);
//发送阅知信息
MessageBto messageBto = new MessageBto();
messageBto.setContent("业务办结");
messageBto.setTaskId(taskBto.getId());
messageBto.setIsHighLight(0);
messageBto.setInvolveUserIdList(userPublicService.findOtherUser(userUtils.getCurrentUserId()));
messageBto.setBusinessType(taskBto.getBusinessType());
messageService.add(messageBto);
return ResponseEntity.ok("办结成功");
}
}
......@@ -125,7 +125,6 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
TaskBto taskBto = taskMap.get(taskId).parse2Bto();
DeviceApplyBill deviceApplyBill = billMap.get(taskBto.getBillId());
Boolean isComplete = true;
if (deviceApplyBill.getReplyVos()!=null&&!"".equals(deviceApplyBill.getReplyVos())) {
List<ReplyVo> replyVos = JacksonUtil.readValue(deviceApplyBill.getReplyVos(), new TypeReference<List<ReplyVo>>() {
});
......@@ -166,6 +165,7 @@ public class DeviceApplyBillServiceImpl implements DeviceApplyBillService {
}
}
if (isComplete){
taskService.addInvolveUser(taskBto,userUtils.getCurrentUserId());
taskService.moveToEnd(taskBto);
//发送阅知信息
MessageBto messageBto = new MessageBto();
......
......@@ -50,9 +50,9 @@ public enum LogType {
RFID_3(16,TAG.id, RFID_BUSINESS_NEED_CONFIRM.id, ARCHIVE.id, "标签替换审核失败"),
SELF_CHECK_1(17,SELF_CHECK.id, ORIGIN_STATUS.id, SELF_CHECK_CONFIRM.id, "手动自查"),
SELF_CHECK_1(17,SELF_CHECK.id, ORIGIN_STATUS.id, SELF_CHECK_CONFIRM.id, "发起自查"),
SELF_CHECK_2(18,SELF_CHECK.id, WAIT_SELF_CHECK.id, SELF_CHECK_CONFIRM.id, "周期自查"),
SELF_CHECK_2(18,SELF_CHECK.id, WAIT_SELF_CHECK.id, SELF_CHECK_CONFIRM.id, "发起自查"),
SELF_CHECK_3(19,SELF_CHECK.id, SELF_CHECK_CONFIRM.id, END.id, "上传自查单"),
......
......@@ -170,6 +170,7 @@ public class DeviceLibraryController {
Boolean hasOwnUnitDim = deviceLibrarySelectVo.getOwnUnitDim()!=null;
Boolean hasLifeStatusDim = deviceLibrarySelectVo.getLifeStatusDim()!=null;
Boolean hasUpdateTimeDim = deviceLibrarySelectVo.getUpdateTimeDim()!=null;
Boolean hasRfidCardDim = deviceLibrarySelectVo.getRfidCardDim()!=null;
SimpleDateFormat sdf = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );
List<DeviceLibrary> resultList = deviceLibraryService.getCoreDevicePage(deviceLibrarySelectVo);
if (hasModelDim||hasLifeStatusDim||hasLocationUnitDim||hasNameDim||hasOwnUnitDim||hasSeqDim) {
......@@ -181,7 +182,8 @@ public class DeviceLibraryController {
Boolean containOwnUnitDim = !hasOwnUnitDim||deviceLibrary.getOwnUnit().contains(deviceLibrarySelectVo.getOwnUnitDim());
Boolean containLifeStatusDim = !hasLifeStatusDim||deviceLibrary.getLifeStatusName().contains(deviceLibrarySelectVo.getLifeStatusDim());
Boolean containUpdateTimeDim = !hasUpdateTimeDim||sdf.format(deviceLibrary.getUpdateTime()).contains(deviceLibrarySelectVo.getUpdateTimeDim());
return containModelDim&&containNameDim&&containSeqDim&&containLocationUnitDim&&containOwnUnitDim&&containLifeStatusDim&&containUpdateTimeDim;
Boolean containRfidCardDim = !hasRfidCardDim||(deviceLibrary.getRfidCardId()!=null&&deviceLibrary.getRfidCardId().contains(deviceLibrarySelectVo.getRfidCardDim()));
return containModelDim&&containNameDim&&containSeqDim&&containLocationUnitDim&&containOwnUnitDim&&containLifeStatusDim&&containUpdateTimeDim&&containRfidCardDim;
}).collect(Collectors.toList());
}
// List<DeviceVo> deviceVos = resultList.stream().map(DeviceLibrary::parseVo).collect(Collectors.toList());
......@@ -392,7 +394,7 @@ public class DeviceLibraryController {
partList.forEach(DeviceLibrary::setConfigName);
libraryEntities.addAll(partList);
deviceDetailVo.setDeviceList(libraryEntities);
deviceDetailVo.setDeviceLogEntityList(deviceLogEntities);
deviceDetailVo.setDeviceLogEntityList(deviceLogUserVos);
return ResultUtil.success(deviceDetailVo);
} else {
if (deviceLibraryEntity.getPartParentId() == null) {
......
......@@ -48,6 +48,7 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
*/
int countByModelAndLocationUnit(String model, String location);
List<DeviceLibrary> getAllByPartParentId(Integer parentId);
List<DeviceLibrary> getAllByPartParentIdAndIsPart(Integer parentId, Integer isPart);
......@@ -124,6 +125,13 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
@Modifying
@Query("update DeviceLibrary o set o.lifeStatus = :lifeStatus ,o.ownUnit = :unitName ,o.locationUnit = :unitName ,o.updateTime=current_timestamp where o.id in :idList")
int upDateLeftStatusAndOwnUnitName(Integer lifeStatus,String unitName,@Param("idList") List<Integer> idList);
List<DeviceLibrary> findAllByLifeStatus(Integer status);
@Transactional
@Modifying
@Query("update DeviceLibrary o set o.rfidSurfaceId = o.seqNumber ,o.updateTime=current_timestamp where o.id in :idList")
int upDateRfidSurfaceIdAsSeqNumber(@Param("idList") List<Integer> idList);
}
......@@ -121,6 +121,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// return GetTreeUtils.splitTree(libraryEntities,DeviceLibrary::getChilds,DeviceLibrary::setChildNull);
libraryEntities.forEach(DeviceLibrary::setConfigName);
return libraryEntities;
}
//areId不为空,查询某个区域下的所有单位的所有装备
......@@ -146,6 +147,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// return GetTreeUtils.splitTree(deviceLibraries,DeviceLibrary::getChilds,DeviceLibrary::setChildNull);
libraryEntities.forEach(DeviceLibrary::setConfigName);
return libraryEntities;
}
//省能看到所有装备
......@@ -166,6 +168,7 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
// resultList = resultList.stream().filter(deviceLibrary -> deviceLibrary.getKeyWords().contains(deviceLibrarySelectVo.getContent())).collect(Collectors.toList());
// }
// return GetTreeUtils.splitTree(libraryEntities,DeviceLibrary::getChilds,DeviceLibrary::setChildNull);
deviceLibraries.forEach(DeviceLibrary::setConfigName);
return deviceLibraries;
} else {
throw new ApiException(ResultUtil.failed("区域等级只能为1,2,3"));
......@@ -694,10 +697,10 @@ public class DeviceLibraryServiceImpl implements DeviceLibraryService {
}
if (deviceLibrarySelectVo.getIsPrint()!=null){
if (deviceLibrarySelectVo.getIsPrint()==1){
predicateBuilder.notIn("rfidSurfaceId", (Object) null);
predicateBuilder.notIn("rfidCardId", "");
}
else if (deviceLibrarySelectVo.getIsPrint()==0){
predicateBuilder.eq("rfidSurfaceId", (Object) null);
predicateBuilder.in("rfidCardId", null,"");
}
}
if (deviceLibrarySelectVo.getContent() != null) {
......
......@@ -93,6 +93,9 @@ public class DeviceLibrarySelectVo extends CustomPage {
@ApiModelProperty(value = "表面号模糊查询字段")
private String surfaceDim;
@ApiModelProperty(value = "标签编码模糊查询字段")
private String rfidCardDim;
@ApiModelProperty(value = "所在单位模糊查询字段")
private String locationUnitDim;
......
......@@ -260,8 +260,8 @@ public enum StatusEnum {
*/
WAIT_BACK(899, "待配发退回"),
ALLOT_BACKING(900, "装备退回中"),
WAIT_UPLOAD_ALLOT_BACK_FILE(901, "待上传退回单"),
WAIT_UPLOAD_BACK_FILE_2(911, "待上传退回单"),
WAIT_UPLOAD_ALLOT_BACK_FILE(901, "待上传签收单"),
WAIT_UPLOAD_BACK_FILE_2(911, "待上传回执单"),
BACK_DRAFT(922,"草稿"),
BACK_SIGN_WAIT_CONFIRM(930,"申请签章待审核"),
BACK_WAIT_SIGN(931,"等待盖章"),
......
......@@ -56,7 +56,7 @@ public class PackingLibrary {
@ApiModelProperty(value = "是不是配件(0:不是,1:是)")
private Integer isPart;
@ApiModelProperty(value = "是不是配件(0:不是,1:是)")
@ApiModelProperty(value = "是不是目录(0:不是,1:是)")
private Integer isRoot;
@ApiModelProperty(value = "排序号")
......
......@@ -174,6 +174,11 @@ public class RepairController {
repairBill.setStartUserB(repairBillSaveVo.getAgent());
repairBill.setStartUserA(userPublicService.getOne(repairBillSaveVo.getStartUseraId()).getName());
RepairBill repairBill1 = deviceRepairBillService.addEntity(repairBill);
Calendar calendar = Calendar.getInstance();
String s1 = "NO:第" + calendar.get(Calendar.YEAR) + "WX" + repairBill1.getId() + "号";
repairBill1.setDocNum(s1);
deviceRepairBillService.update(repairBill1);
repairBill1.setDocNum(s1);
deviceRepairSendBillEntity.setDeviceRepairBillId(repairBill1.getId());
deviceRepairSendBillService.addEntity(deviceRepairSendBillEntity);
//发起任务
......@@ -181,7 +186,7 @@ public class RepairController {
TaskBto taskBto1 = taskService.start(taskBto);
Integer id = taskBto1.getId();
myWebSocket.sendMessage1();
return ResponseEntity.ok("保存成功"+id);
return ResponseEntity.ok("保存成功"+id+"&"+s1);
}
else {
//更新账单
......@@ -719,12 +724,16 @@ public class RepairController {
repairBackBill.setScriptJson(JacksonUtil.toJSon(repairBackBillSaveVo.getScriptSaveVos()));
}
RepairBackBill repairBackBill1 = deviceRepairBackBillService.save(repairBackBill);
Calendar calendar = Calendar.getInstance();
String s1 = "NO:第" + calendar.get(Calendar.YEAR) + "LQ" + repairBackBill.getId() + "号";
repairBackBill1.setDocNum(s1);
deviceRepairBackBillService.update(repairBackBill1);
//发起任务
TaskBto taskBto = new TaskBto(StatusEnum.REPAIR_BACK_DRAFT.id, "维修退回", null, ".", repairBackBill1.getId(), BusinessEnum.REPAIR_BACK.id,userUtils.getCurrentUnitId(), 0, null, userIds);
TaskBto taskBto1 = taskService.start(taskBto);
Integer id = taskBto1.getId();
myWebSocket.sendMessage1();
return ResponseEntity.ok("保存成功"+id);
return ResponseEntity.ok("保存成功"+id+"&"+s1);
}
else {
//更新账单
......@@ -1576,6 +1585,11 @@ public class RepairController {
newDevice.setLifeStatus(2);
}
DeviceLibrary deviceLibrary = deviceLibraryService.addEntity(newDevice);
List<DeviceLibrary> deviceLibraries = deviceLibraryDao.getAllByPartParentId(deviceLibraryEntity.getId());
deviceLibraries.forEach(deviceLibrary1 -> {
deviceLibrary1.setPartParentId(deviceLibrary.getId());
deviceLibraryService.update(deviceLibrary1);
});
//添加新的维修换新装备记录
RepairDetail newRepairDetail = new RepairDetail();
BeanUtils.copyProperties(repairDetail,newRepairDetail);
......
......@@ -31,6 +31,7 @@ import com.tykj.dev.rfid.service.LibraryWarningLogService;
import com.tykj.dev.rfid.service.RfidChangeBillService;
import com.tykj.dev.rfid.service.RfidChangeLogService;
import com.tykj.dev.rfid.service.RfidService;
import com.tykj.dev.rfid.service.impl.RfidServiceImpl;
import com.tykj.dev.rfid.timeTask.InventoryScheduled;
import com.tykj.dev.socket.MyWebSocket;
import io.swagger.annotations.Api;
......@@ -108,10 +109,15 @@ public class RfidController {
@ApiOperation(value = "打印标签", notes = "可以通过这个接口打印RFID")
@PostMapping(value = "/print")
public ResponseEntity printRfid(@RequestBody List<RfidPrintVo> rfid) {
Map<String,DeviceLibrary> map = deviceLibraryService.getAllDeviceSeqMap();
List<DeviceLogDto> deviceLogDtos = new ArrayList<>();
//调用打印服务 批量打印
for (RfidPrintVo printVo : rfid) {
rfidService.printString(printVo.getMakeNumber(),printVo.getDeviceNumber(),printVo.getContent());
DeviceLibrary deviceLibrary = map.get(printVo.getDeviceNumber());
rfidService.printString(RfidServiceImpl.completeRfidStr(String.valueOf(deviceLibrary.getId())), deviceLibrary.getModel(), deviceLibrary.getName(),deviceLibrary.getSeqNumber());
deviceLogDtos.add(new DeviceLogDto(deviceLibrary.getId(), "打印标签", null));
}
deviceLogService.addAllLog(deviceLogDtos);
return ResultUtil.success("打印成功");
}
......
......@@ -19,4 +19,5 @@ public class RfidPrintVo {
@ApiModelProperty(name = "表面号")
String content;
}
......@@ -32,12 +32,9 @@ public interface RfidService {
/**
* 描述:调用打印机打印内容(如出现打印不对齐的情况请联系管理员)
*
* @param content 打印内容
* @param makeNumber 生产号
* @param deviceNumber 装备号
* @return
*/
boolean printString(String makeNumber,String deviceNumber,String content);
boolean printString(String rfidContent ,String str1,String str2,String str3);
/**
* 描述:生成装备的RFID表面号
......
......@@ -82,25 +82,22 @@ public class RfidServiceImpl implements RfidService {
/**
* 描述:调用打印机打印内容(如出现打印不对齐的情况请联系管理员)
*
* @param content 打印内容
* @param makeNumber 生产号
* @param deviceNumber 装备号
* @return
*/
@Override
public boolean printString(String makeNumber,String deviceNumber,String content) {
public boolean printString(String rfidContent ,String str1,String str2,String str3) {
try {
Connection connection = new TcpConnection("192.168.000.222", 6101);
connection.open();
printer = ZebraPrinterFactory.getInstance(connection);
String demoFile = createDemoFile(printer.getPrinterControlLanguage(),makeNumber,deviceNumber, content, 60, 55);
String demoFile = createDemoFile(printer.getPrinterControlLanguage(),rfidContent,str1, str2,str3, 60, 55);
printer.sendFileContents(demoFile);
} catch (ConnectionException e) {
throw new ApiException(ResultUtil.failed("未找到对应的打印机"));
throw new ApiException("未找到对应的打印机");
} catch (ZebraPrinterLanguageUnknownException e) {
throw new ApiException(ResultUtil.failed("打印机内容错误"));
throw new ApiException("打印机内容错误");
} catch (IOException e) {
throw new ApiException(ResultUtil.failed("生成打印文件失败"));
throw new ApiException("生成打印文件失败");
}
return true;
}
......@@ -115,7 +112,7 @@ public class RfidServiceImpl implements RfidService {
* @return 拼接成功的打印机ZPL
* @throws IOException IO错误
*/
private static String createDemoFile(PrinterLanguage pl,String rfidContent ,String str1,String str2, int marginLeft, int marginTop) throws IOException {
private static String createDemoFile(PrinterLanguage pl,String rfidContent ,String str1,String str2,String str3, int marginLeft, int marginTop) throws IOException {
if (!checkRFID(rfidContent)){
throw new ApiException("");
}
......@@ -123,14 +120,16 @@ public class RfidServiceImpl implements RfidService {
File tmpFile = File.createTempFile("TEST_ZEBRA", "LBL");
FileOutputStream os = new FileOutputStream(tmpFile);
byte[] configLabel = null;
SplitStringInfo deviceNumberSplit = spiltLineString(str1, null);
SplitStringInfo contentSplit = spiltLineString(str2, deviceNumberSplit.getStringLineNumber());
SplitStringInfo deviceNumberSplit = spiltLineString("型号"+str1, null);
SplitStringInfo contentSplit = spiltLineString("名称"+str2, deviceNumberSplit.getStringLineNumber());
SplitStringInfo str3Split = spiltLineString("序列号"+str3, contentSplit.getStringLineNumber());
//补零
rfidContent = completeRfidStr(rfidContent);
if (pl == PrinterLanguage.ZPL) {
configLabel = ("^XA\n" +
// "~SD25\n" +
"^CW1,E:SIMSUN.FNT"+
"^CI28"+
"^CW1,E:SIMSUN.TTF"+
"^RS,B30\n"+
"^RFW,H\n" +
"^FD"+rfidContent+"\n" +
......@@ -138,6 +137,7 @@ public class RfidServiceImpl implements RfidService {
"^LH" + marginLeft + "," + marginTop + "\n" +
deviceNumberSplit.getSplitString()+
contentSplit.getSplitString()+
str3Split.getSplitString()+
"^PQ1,0,1,Y\n" +
"^XZ").getBytes();
}
......@@ -168,7 +168,7 @@ public class RfidServiceImpl implements RfidService {
int totalLine = getLineNum(content,RFID_LINE_LENGTH);
for (int i = 0; i < totalLine; i++) {
String cutedStr = cutStr(content, RFID_LINE_LENGTH);
resultStringBuild.append("^A1N,25,,E:SIM000.FNT^FR^FD\n^FO0,"+line*30+"^FD"+cutedStr+"^FS\n");
resultStringBuild.append("^A1N,25,^FR^FD\n^FO0,"+line*30+"^FD"+cutedStr+"^FS\n");
content = content.substring(cutedStr.length());
line = line+1;
}
......@@ -225,7 +225,7 @@ public class RfidServiceImpl implements RfidService {
Connection connection = new TcpConnection("192.168.0.222", 6101);
connection.open();
printer = ZebraPrinterFactory.getInstance(connection);
String demoFile = createDemoFile(printer.getPrinterControlLanguage(),"1234","装备号:xxxxxxxxxxxxxxxxxxxxxxxx", "内容:ABCD", 60, 80);
String demoFile = createDemoFile(printer.getPrinterControlLanguage(),"1234","装备号:xxxxxxxxxxxxxxxxxxxxxxxx", "内容:ABCD","序列号:123", 60, 80);
printer.sendFileContents(demoFile);
}
......
package com.tykj.dev.device.sendback.service;
import com.sun.xml.internal.bind.v2.runtime.reflect.Lister;
import com.tykj.dev.device.library.subject.domin.DeviceLibrary;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepel;
import com.tykj.dev.device.sendback.entity.domain.DeviceRepelDetail;
import com.tykj.dev.device.sendback.entity.vo.*;
import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.user.subject.entity.SecurityUser;
import org.springframework.data.domain.Page;
import java.util.List;
......
......@@ -111,17 +111,22 @@ public class RepelQueryServiceImpl implements RepelQueryService {
if (deviceLibrary.getLifeStatus() == 2 || deviceLibrary.getLifeStatus() == 15 || deviceLibrary.getLifeStatus() == 14 || deviceLibrary.getLifeStatus() == 6) {
deviceLibraries.add(deviceLibrary);
modelMap.put(deviceLibrary.getModel(),"");
typeMap.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMap.put(deviceLibrary.getType(), deviceLibrary.getTypeName());
}
} else {
deviceLibrariesAbnormal.add(deviceLibrary);
modelMapAbnormal.put(deviceLibrary.getModel(),"");
typeMapAbnormal.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMapAbnormal.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
}
}
} else {
deviceLibrariesAbnormal.add(deviceLibrary);
modelMapAbnormal.put(deviceLibrary.getModel(),"");
typeMapAbnormal.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMapAbnormal.put(deviceLibrary.getType(), deviceLibrary.getTypeName());
}
}
}
);
......@@ -140,16 +145,22 @@ public class RepelQueryServiceImpl implements RepelQueryService {
if (deviceLibrary.getLifeStatus() == 2 || deviceLibrary.getLifeStatus() == 15 || deviceLibrary.getLifeStatus() == 14 || deviceLibrary.getLifeStatus() == 6) {
deviceLibraries.add(deviceLibrary);
modelMap.put(deviceLibrary.getModel(),"");
typeMap.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMap.put(deviceLibrary.getType(), deviceLibrary.getTypeName());
}
} else {
deviceLibrariesAbnormal.add(deviceLibrary);
modelMapAbnormal.put(deviceLibrary.getModel(),"");
typeMapAbnormal.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMapAbnormal.put(deviceLibrary.getType(), deviceLibrary.getTypeName());
}
}
} else {
deviceLibrariesAbnormal.add(deviceLibrary);
modelMapAbnormal.put(deviceLibrary.getModel(),"");
typeMapAbnormal.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMapAbnormal.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
}
}
}
);
......@@ -451,16 +462,22 @@ public class RepelQueryServiceImpl implements RepelQueryService {
if (deviceLibrary.getLifeStatus()==2 ||deviceLibrary.getLifeStatus()==14) {
deviceLibraries.add(deviceLibrary);
modelMap.put(deviceLibrary.getModel(),"");
typeMap.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMap.put(deviceLibrary.getType(), deviceLibrary.getTypeName());
}
}else {
deviceLibrariesAbnormal.add(deviceLibrary);
modelMapAbnormal.put(deviceLibrary.getModel(),"");
typeMapAbnormal.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMapAbnormal.put(deviceLibrary.getType(), deviceLibrary.getTypeName());
}
}
}else {
deviceLibrariesAbnormal.add(deviceLibrary);
modelMapAbnormal.put(deviceLibrary.getModel(),"");
typeMapAbnormal.put(deviceLibrary.getType(),deviceLibrary.getTypeName());
if (deviceLibrary.getType()!=null) {
typeMapAbnormal.put(deviceLibrary.getType(), deviceLibrary.getTypeName());
}
}
}
);
......
......@@ -216,7 +216,7 @@ public class StatisticalController {
Boolean containOwnUnitDim = !hasOwnUnitDim||deviceLibrary.getOwnUnit().contains(deviceLibrarySelectVo.getOwnUnitDim());
Boolean containLifeStatusDim = !hasLifeStatusDim||deviceLibrary.getLifeStatusName().contains(deviceLibrarySelectVo.getLifeStatusDim());
Boolean containUpdateTimeDim = !hasUpdateTimeDim||sdf.format(deviceLibrary.getUpdateTime()).contains(deviceLibrarySelectVo.getUpdateTimeDim());
Boolean sameYear = !hasYear||deviceLibrary.getUpdateTime().getYear()==deviceLibrarySelectVo.getYear()-1900;
Boolean sameYear = !hasYear||(deviceLibrary.getUpdateTime()!=null&&deviceLibrary.getUpdateTime().getYear()==deviceLibrarySelectVo.getYear()-1900);
return containModelDim&&containNameDim&&containSeqDim&&containLocationUnitDim&&containOwnUnitDim&&containLifeStatusDim&&containUpdateTimeDim&&sameYear;
}).collect(Collectors.toList());
}
......
......@@ -4,8 +4,11 @@ import com.tykj.dev.device.storage.subject.domin.StorageBill;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import java.util.List;
/**
* @author dengdiyi
*/
public interface StorageBillDao extends JpaRepository<StorageBill, Integer>, JpaSpecificationExecutor<StorageBill> {
List<StorageBill> findAllByStorageStatusAndIsPrint(Integer storageStatus,Integer isPrint);
}
......@@ -112,6 +112,9 @@ public class StorageBillSaveVo {
@ApiModelProperty(value = "入库列装详情")
private List<StorageBillDetail> storageBillDetails = new ArrayList<>();
@ApiModelProperty(value = "存在申请任务的序列号")
private List<String> hasTaskSeqs = new ArrayList<>();
public StorageBill toDo() {
//modelMap复制
ModelMapper mapper = BeanHelper.getUserMapper();
......
......@@ -80,4 +80,6 @@ public interface TaskDao extends JpaRepository<Task, Integer>, JpaSpecificationE
List<Task> findAllByBusinessTypeAndCustomInfo(Integer businessType,String customInfo);
List<Task> findAllByBusinessTypeAndCustomInfoAndBillStatus(Integer businessType,String customInfo,Integer billStatus);
List<Task> findAllByBusinessTypeAndBillIdIn(Integer businessType,List<Integer> billIds);
}
......@@ -898,7 +898,7 @@ public class TaskServiceImpl implements TaskService {
//查询跟踪
if (taskSelectVo.getSelectNum() == 3) {
//所有涉及人员所在单位包含当前用户所在单位且指针对应UserId不是当前用户
List<Integer> status = Arrays.asList(201,333,810,322,722,788,1250,2223,8110,888,140);
List<Integer> status = Arrays.asList(201,333,810,322,722,788,1250,2223,8110,888,140,130,141,111);
List<TaskBto> taskBtoList = taskBtos.stream()
.filter(taskBto -> {
// boolean unitExists = getUnitsByUsers(taskBto.getInvolveUserIdList()).contains(unitId);
......
......@@ -115,6 +115,7 @@ public class TaskSelectController {
@ApiOperation(value = "查询业务对应页面的数据", notes = "可以通过这个接口查询业务对应页面的数据")
@GetMapping("/manage/detail/{id}")
public ResponseEntity selectData(@PathVariable("id") int taskId) {
Map<Integer,DeviceLibrary> deviceLibraryMap = deviceLibraryService.getAllDeviceMap();
TaskBto taskBto = taskService.get(taskId);
Integer bussinessType = taskBto.getBusinessType();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论