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

更新

上级 462e5f0f
......@@ -4,6 +4,7 @@ import com.tykj.dev.blockcha.conf.BcUrl;
import com.tykj.dev.blockcha.subject.entity.*;
import com.tykj.dev.blockcha.subject.service.BlockChainUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.client.RestTemplate;
......@@ -40,7 +41,8 @@ public class BlockChainUtilImpl implements BlockChainUtil {
private final static String BLOCK_CHAIN_URL4 = "http://10.153.110.10:8076";
private final static String BLOCK_CHAIN_URL5 = "http://10.153.6.11:8076";
@Value("${useBlockcha:fasle")
private String useBlockcha;
@Override
public BcStatus getStatus() {
......@@ -184,6 +186,7 @@ public class BlockChainUtilImpl implements BlockChainUtil {
@Override
public BcHash sendHash(Integer subCode, String content) {
if ("true".equals(this.useBlockcha)) {
SortedMap<Object, Object> request = getRequest();
request.put("content", HexUtil.hex64(content));
request.put("subCode", subCode);
......@@ -196,6 +199,10 @@ public class BlockChainUtilImpl implements BlockChainUtil {
request,
BcHash.class
);
}
else {
return new BcHash(0, "", new BcHashData("000"));
}
}
@Override
......
......@@ -161,7 +161,7 @@ public enum LogType {
SEND_BACK_8(76,SEND_BACK.id, ORIGIN_STATUS.id, SEND_BACK_1205.id, "市转发了省清退任务,对区县发起了清退任务"),
SEND_BACK_9(77,SEND_BACK.id, SEND_BACK_1201.id, SEND_BACK_1206.id, "市等待下级单位提交清退装备,在选择装备库送至省里"),
SEND_BACK_10(78,SEND_BACK.id, SEND_BACK_1205.id,SEND_BACK_1206.id , "区县根据清退通知,选择了需要清退对装备"),
SEND_BACK_11(100,SEND_BACK.id, SEND_BACK_1206.id,SEND_BACK_1207.id , "区县根据清退通知,选择了需要清退对装备"),
SEND_BACK_11(10000,SEND_BACK.id, SEND_BACK_1206.id,SEND_BACK_1207.id , "区县根据清退通知,选择了需要清退对装备"),
......
......@@ -92,7 +92,11 @@ public enum BusinessEnum {
/**
* 配发退回
*/
ALLOT_BACK(22, "配发退回");
ALLOT_BACK(22, "配发退回"),
/**
* 报废
*/
SCRAP(23, "报废业务");
public Integer id;
......
......@@ -21,7 +21,7 @@ import java.util.List;
@ApiModel(value = "报废单存储类", description = "报废单存储类")
public class ScrapSaveVo {
@NotNull(message = "repairBillId不能为空")
// @NotNull(message = "repairBillId不能为空")
@Min(value = 1,message = "repairBillId不能小于1")
@ApiModelProperty(value = "维修单id")
private Integer repairBillId;
......@@ -46,11 +46,11 @@ public class ScrapSaveVo {
@ApiModelProperty(value = "承办人")
private String undertaker;
@NotNull(message = "fileName不能为空")
// @NotNull(message = "fileName不能为空")
@ApiModelProperty(value = "报废单文件名")
private String fileName;
@NotNull(message = "fileUrl不能为空")
// @NotNull(message = "fileUrl不能为空")
@ApiModelProperty(value = "报废单文件URL")
private String fileUrl;
......
......@@ -15,7 +15,6 @@ import com.tykj.dev.device.task.subject.domin.TaskLog;
import com.tykj.dev.device.task.subject.vo.TaskSelectVo;
import com.tykj.dev.device.task.subject.vo.TaskUserVo;
import com.tykj.dev.device.task.utils.TaskUtils;
import com.tykj.dev.device.user.cache.UnitsCache;
import com.tykj.dev.device.user.cache.UserCache;
import com.tykj.dev.device.user.subject.entity.User;
import com.tykj.dev.device.user.subject.service.UserPublicService;
......@@ -59,9 +58,6 @@ public class TaskServiceImpl implements TaskService {
@Autowired
private UserCache userCache;
@Autowired
private UnitsCache unitsCache;
@Autowired
private BlockChainUtil blockChainUtil;
......@@ -594,11 +590,11 @@ public class TaskServiceImpl implements TaskService {
//涉及人员当前指针为-1,且所属单位为当前单位
List<TaskBto> taskBtos1 = taskBtos.stream()
.filter(taskBto -> {
boolean involveExists = taskBto.getInvolveUserIdList().contains(userId);
// boolean involveExists = taskBto.getInvolveUserIdList().contains(userId);
boolean pointExists = taskBto.getCurrentPoint() < taskBto.getInvolveUserIdList().size();
boolean userConfirm = taskBto.getInvolveUserIdList().get(taskBto.getCurrentPoint()) == -1;
boolean unitConfirm = taskBto.getOwnUnit().equals(unitId);
return !involveExists && pointExists && userConfirm && unitConfirm;
return pointExists && userConfirm && unitConfirm;
})
.collect(Collectors.toList());
taskBtoList.addAll(taskBtos1);
......@@ -655,7 +651,9 @@ public class TaskServiceImpl implements TaskService {
users.stream().filter(user -> user.getUnitsId().equals(taskUserVo.getOwnUnit())).forEach(user -> {
stringBuffer.append(user.getName()).append(",");
});
stringBuffer.deleteCharAt(stringBuffer.length()-1);
if (stringBuffer.length()>0) {
stringBuffer.deleteCharAt(stringBuffer.length() - 1);
}
taskUserVo.setProcessingUser(stringBuffer.toString());
}
else {
......
......@@ -12,4 +12,5 @@ server.servlet.session.timeout=PT1H
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone=GMT+8
file.path=/Users/zjm/code/
preview.path=http://192.168.102.26:8087/file/
\ No newline at end of file
preview.path=http://192.168.102.26:8087/file/
useBlockcha=fasle
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论