提交 0a9d5d45 authored 作者: 133's avatar 133

【清退】 代码提交

上级 35c40056
......@@ -175,9 +175,20 @@ 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(10000,SEND_BACK.id, SEND_BACK_1206.id,SEND_BACK_1207.id , "区县根据清退通知,选择了需要清退对装备"),
SEND_BACK_11(10001,SEND_BACK.id, SEND_BACK_1206.id,SEND_BACK_1207.id , "选择需要清退对装备,提交等待上级审核"),
SEND_BACK_12(10002,SEND_BACK.id, SEND_BACK_1207.id,SEND_BACK_1208.id , "上级审核通过,可以进行出库,把装备送至上级"),
SEND_BACK_13(10003,SEND_BACK.id, SEND_BACK_1208.id,SEND_BACK_1209.id , "清退装备已出库,等待单位接收"),
SEND_BACK_14(10004,SEND_BACK.id, SEND_BACK_1209.id,END.id , "单位接收完成"),
SEND_BACK_15(10005,SEND_BACK.id, SEND_BACK_1207.id,SEND_BACK_1206.id , "上级审核不通过"),
SEND_BACK_16(10006,SEND_BACK.id, SEND_BACK_1206.id,SEND_BACK_1208.id , "全部清退任务,不需要审核,等待清退装备出库"),
SEND_BACK_17(10007,SEND_BACK.id, ORIGIN_STATUS.id,SEND_BACK_1210.id , "发起对中办对清退任务,等待中办签字单据"),
SEND_BACK_18(10008,SEND_BACK.id, SEND_BACK_1210.id,END.id , "上传中办签字单据,任务结束"),
SEND_BACK_19(10009,SEND_BACK.id, ORIGIN_STATUS.id,SEND_BACK_1211.id , "市发起清退任务,待省级单位审核"),
SEND_BACK_20(100010,SEND_BACK.id, SEND_BACK_1211.id,END.id , "省对单位审核不通过,任务结束"),
SEND_BACK_21(100011,SEND_BACK.id, SEND_BACK_1211.id,SEND_BACK_1204.id , "省对单位审核通过,等待下级单位提交"),
SEND_BACK_23(100013,SEND_BACK.id, SEND_BACK_1212.id,END.id , "清退统计任务已办结"),
SEND_BACK_24(100014,SEND_BACK.id, SEND_BACK_1204.id,SEND_BACK_1212.id , "市清退统计任务待办结"),
SEND_BACK_25(100015,SEND_BACK.id, SEND_BACK_1200.id,SEND_BACK_1212.id , "省清退统计任务待办结"),
......
......@@ -61,6 +61,8 @@ public interface DeviceLibraryDao extends JpaRepository<DeviceLibrary, Integer>,
List<DeviceLibrary> findAllByPackingIdInAndOwnUnit(List<Integer> packingIds,String unitNames);
List<DeviceLibrary> findAllByPackingIdInAndOwnUnitIn(List<Integer> packingIds,List<String> unitNames);
List<DeviceLibrary> findAllByOwnUnitAndLocationUnitAndLifeStatus(String ownUnitName,String locationUnitName,Integer status);
}
......@@ -82,6 +82,8 @@ public enum StatusEnum {
SEND_BACK_1209(1209, "清退装备等待入库"),
SEND_BACK_1210(1210, "省清退送往中办等待回执单"),
SEND_BACK_1211(1211, "市发清退任务待省审核"),
SEND_BACK_1212(1212, "清退统计任务待办结"),
......
......@@ -67,13 +67,11 @@ public final class JacksonUtil {
if (objectMapper == null) {
objectMapper = new ObjectMapper();
}
try {
return objectMapper.readValue(jsonStr, valueTypeRef);
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
......
......@@ -12,4 +12,6 @@ import java.util.List;
public interface PackingLibraryDao extends JpaRepository<PackingLibrary, Integer>, JpaSpecificationExecutor<PackingLibrary> {
List<PackingLibrary> findAllByPartParentId(Integer id);
List<PackingLibrary> findAllByIdIn(List<Integer> ids);
}
......@@ -20,6 +20,10 @@
<groupId>com.tykj</groupId>
<artifactId>dev-task</artifactId>
</dependency>
<dependency>
<groupId>com.tykj</groupId>
<artifactId>dev-packing</artifactId>
</dependency>
<dependency>
<groupId>com.tykj.dev</groupId>
<artifactId>misc</artifactId>
......
......@@ -131,8 +131,8 @@ public class RepelDevController {
* 市发起清退任务
*/
@ApiOperation(value = "市发起清退任务", notes = "市发起清退任务")
@PostMapping(value ="/receiptSingle/{userId}")
public ResponseEntity receiptSingle(@PathVariable Integer userId, @RequestBody DeviceRepel deviceRepel){
@PostMapping(value ="/cityInitiateRepel/{userId}")
public ResponseEntity cityInitiateRepel(@PathVariable Integer userId, @RequestBody DeviceRepel deviceRepel){
repelBusinessService.cityInitiateRepel(deviceRepel,userId);
return ResponseEntity.ok("省上传中办回执单,成功任务结束");
}
......@@ -141,10 +141,20 @@ public class RepelDevController {
* 省审核市清退任务
*/
@ApiOperation(value = "省审核市清退任务", notes = "省审核市清退任务")
@PostMapping(value ="/receiptSingle/{taskId}/{userId}")
public ResponseEntity receiptSingle(@PathVariable Integer taskId,@PathVariable Integer userId, @RequestBody RepelAuditResult repelAuditResult){
@PostMapping(value ="/provinceAuditCity/{taskId}/{userId}")
public ResponseEntity provinceAuditCity(@PathVariable Integer taskId,@PathVariable Integer userId, @RequestBody RepelAuditResult repelAuditResult){
repelBusinessService.provinceAuditCity(taskId,userId,repelAuditResult);
return ResponseEntity.ok("省上传中办回执单,成功任务结束");
}
/**
* 统计清退任务的办结
*/
@ApiOperation(value = "统计清退任务的办结", notes = "统计清退任务的办结")
@GetMapping(value ="/repelEnd/{taskId}")
public ResponseEntity cityRepelEnd(@PathVariable Integer taskId){
repelBusinessService.cityRepelEnd(taskId);
return ResponseEntity.ok("统计清退任务的办结");
}
}
......@@ -58,10 +58,10 @@ public class RepelQueryController {
/**
* 待清退列表
*/
@GetMapping(value ="/toRepelList/{unitName}")
@GetMapping(value ="/toRepelList/{unitId}")
@ApiOperation(value = "待清退列表", notes = "待清退列表")
public ResponseEntity toRepelList(@PathVariable String unitName){
return ResponseEntity.ok(repelQueryService.toRepelList(unitName));
public ResponseEntity toRepelList(@PathVariable Integer unitId){
return ResponseEntity.ok(repelQueryService.toRepelList(unitId));
}
/**
......@@ -72,4 +72,13 @@ public class RepelQueryController {
public ResponseEntity clearedList(@PathVariable Integer unitId){
return ResponseEntity.ok(repelQueryService.clearedList(unitId));
}
/**
* 省直属任务装备查询接口
*/
@GetMapping(value ="/provinceDirectlyUnderDev/{taskId}")
@ApiOperation(value = "省直属任务装备查询接口", notes = "省直属任务装备查询接口")
public ResponseEntity provinceDirectlyUnderDev(@PathVariable Integer taskId){
return ResponseEntity.ok(repelQueryService.provinceDirectlyUnderDev(taskId));
}
}
......@@ -45,10 +45,15 @@ public interface RepelQueryService {
/**
* 待清退列表 省
*/
List<DeviceLibrary> toRepelList(String unitName);
List<DeviceLibrary> toRepelList(Integer unitId);
/**
* 已清退列表
*/
List<DeviceLibrary> clearedList(Integer unitId);
/**
*
*/
List<DeviceLibrary> provinceDirectlyUnderDev(Integer taskId);
}
......@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
......@@ -65,10 +66,14 @@ public class DeviceRepelDetailServiceImpl implements DeviceRepelDetailService {
private List<DeviceLibrary> findInvoleDevice(String involeDevice){
if (involeDevice!=null && !involeDevice.equals(",") ) {
List<String> idStringList = Arrays.asList(involeDevice.split(","));
List<String> idListString = idStringList.stream().filter(list2->!list2.equals("")).collect(Collectors.toList());
System.out.println(idListString);
List<Integer> devIds = idListString.stream().map(Integer::parseInt).collect(Collectors.toList());
return deviceLibraryDao.getDeviceLibraryEntitiesByIdIn(devIds);
}else {
return new ArrayList<>();
}
}
}
......@@ -5,9 +5,11 @@ 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.domain.RepelDeviceUnit;
import com.tykj.dev.device.sendback.entity.domain.RepelTaskStatistical;
import com.tykj.dev.device.sendback.entity.vo.DeviceChooseRepel;
import com.tykj.dev.device.sendback.entity.vo.RepelStatisticsVo;
import com.tykj.dev.device.sendback.service.*;
import com.tykj.dev.device.sendback.util.StringUtils;
import com.tykj.dev.device.task.service.TaskService;
import com.tykj.dev.device.task.subject.bto.TaskBto;
import com.tykj.dev.device.user.subject.entity.Units;
......@@ -42,7 +44,6 @@ public class RepelQueryServiceImpl implements RepelQueryService {
DeviceRepelService deviceRepelService;
@Autowired
DeviceLibraryDao deviceLibraryDao;
@Autowired
UnitsService unitsService;
@Autowired
......@@ -93,8 +94,9 @@ public class RepelQueryServiceImpl implements RepelQueryService {
}
@Override
public List<DeviceLibrary> toRepelList(String unitName) {
return deviceLibraryDao.findAllByOwnUnitAndLocationUnitAndLifeStatus(unitName,unitName,12);
public List<DeviceLibrary> toRepelList(Integer unitId) {
Units units= unitsService.findById(unitId);
return deviceLibraryDao.findAllByOwnUnitAndLocationUnitAndLifeStatus(units.getName(),units.getName(),12);
}
@Override
......@@ -103,13 +105,26 @@ public class RepelQueryServiceImpl implements RepelQueryService {
return deviceUnitService.findHasRepel(unitId);
}
@Override
public List<DeviceLibrary> provinceDirectlyUnderDev(Integer taskId) {
TaskBto taskBto= taskService.get(taskId);
DeviceRepelDetail deviceRepelDetail=repelDetailService.findDeviceRepelDetailNoDev(taskBto.getBillId());
DeviceRepel deviceRepel=deviceRepelService.findDeviceRepel(deviceRepelDetail.getRepelId());
List<String> unitNames=unitsService.finAllDirectlUnderUnits().stream().map(Units::getName).collect(Collectors.toList());
return deviceLibraryDao.findAllByPackingIdInAndOwnUnitIn(StringUtils.stringToList(deviceRepel.getFielding()),unitNames);
}
private List<DeviceLibrary> findInvoleDevice(String involeDevice){
if (involeDevice!=null && !involeDevice.equals("")&& !involeDevice.equals(",")) {
List<String> idStringList = Arrays.asList(involeDevice.split(","));
List<String> idListString = idStringList.stream().filter(list2->!list2.equals("")).collect(Collectors.toList());
System.out.println(idListString);
List<Integer> devIds = idListString.stream().map(Integer::parseInt).collect(Collectors.toList());
return deviceLibraryDao.getDeviceLibraryEntitiesByIdIn(devIds);
}else {
return new ArrayList<>();
}
}
}
......@@ -749,7 +749,6 @@ public class SendBackServiceImpl implements SendBackService {
List<String> idListString = idStringList.stream().filter(list2->!list2.equals("")).collect(Collectors.toList());
System.out.println(idListString);
List<Integer> devIds = idListString.stream().map(Integer::parseInt).collect(Collectors.toList());
return deviceLibraryDao.getDeviceLibraryEntitiesByIdIn(devIds);
}
......
......@@ -38,4 +38,6 @@ public interface UnitsDao extends JpaRepository<Units, Integer>, JpaSpecificatio
List<Units> findAllByLevelIn(List<Integer> levels);
List<Units> findAllByType(Integer type);
}
......@@ -60,13 +60,16 @@ public class Units {
private Integer idDel;
/**
* 类型 1.在系统单位
* 2.省直属单位 areaid 0
* 3.省上级单位 areaid 0
序列号
*/
@ApiModelProperty(value = "序列号", name = "code", example = "12321L")
private String code;
/**
* 1.在系统单位
* 2.省直属单位 areaid 0
* 3.省上级单位 areaid 0
*/
private Integer type;
/**
* 区域id
*/
......@@ -91,7 +94,7 @@ public class Units {
1,
0,
"1234",
1,
1,1,
null,
null
);
......
......@@ -113,4 +113,6 @@ public interface UnitsService extends PublicService<Units> {
*/
List<Units> findAllByIdIn(List<Integer> ids);
List<Units> finAllDirectlUnderUnits();
}
......@@ -267,6 +267,11 @@ public class UnitsServiceImpl implements UnitsService {
return unitsDao.findAllById(ids);
}
@Override
public List<Units> finAllDirectlUnderUnits() {
return unitsDao.findAllByType(2);
}
@Override
public Units save(Units units) {
......
......@@ -39,7 +39,8 @@ public class VenitalisServiceImpl implements VenitalisService {
private UserLogDao userLogDao;
private final static String http="http://10.153.4.11:8081";
// private final static String http="http://10.153.4.11:8081";
private final static String http="http://192.168.0.80:8081";
private final static String REGISTERE="/api/v2/auth/register";
private final static String CONTRAST="/api/v2/auth/identify";
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论