Browse Source

巡检代码修改

master
hp 3 years ago
parent
commit
522a007644
  1. 4
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetDto.java
  2. 3
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionMapper.java
  3. 4
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionService.java
  4. 110
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetService.java
  5. 4
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthMapper.java
  6. 7
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthService.java
  7. 19
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportService.java
  8. 6
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/AppScmVehiclePatrolinVo.java
  9. 6
      anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/PatrolinspectionInfoVo.java

4
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetDto.java

@ -68,6 +68,10 @@ public class ScmVehiclePatrolinspectionsheetDto implements Dto {
private String problems;
@ApiModelProperty("处理结果")
private String results;
@ApiModelProperty("相关责任人名称")
private String liableName;
@ApiModelProperty("相关责任人sid")
private String liableSid;
@ApiModelProperty("相关责任人")
private List<AppLiableListDto> liableList;
@ApiModelProperty("经纬度")

3
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionMapper.java

@ -99,9 +99,6 @@ public interface ScmVehiclePatrolinspectionMapper extends BaseMapper<ScmVehicleP
List<AppVinAndRemarksVo> getMonthRemarksByMainSid(@Param("sid") String sid, @Param("stateKey") String stateKey);
@Select("update scm_vehicle_patrolinspection set isDelete = 1 where sid = #{sid} ")
void updateBySid(@Param("sid") String sid);
@Select("update scm_vehicle_patrolinspection set isDelete = 1 where mainSid = #{sid} and patrolInspectionStateKey = '000' ")
void updatePatrolInspectionState(@Param("sid") String sid);
}

4
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspection/ScmVehiclePatrolinspectionService.java

@ -272,10 +272,6 @@ public class ScmVehiclePatrolinspectionService extends MybatisBaseService<ScmVeh
* @param sid
* @return
*/
public void updatePatrolInspectionState(String sid) {
baseMapper.updateBySid(sid);
}
public void updateState(String sid) {
baseMapper.updatePatrolInspectionState(sid);
}

110
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclepatrolinspectionsheet/ScmVehiclePatrolinspectionsheetService.java

@ -201,20 +201,12 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
BaseVehicleVo data = baseVehicleFeign.selVehicleByVinNo(scmVehiclePatrolinspection.getVinNo()).getData();
patrolinspectionsheetInfoVo.setModel(data.getModelName());
patrolinspectionsheetInfoVo.setModelSid(data.getModelSid());
ScmWarehouse scmWarehouse = scmWarehouseService.fetchBySid(scmVehiclePatrolinspection.getLocationSid());
patrolinspectionsheetInfoVo.setLiableName(scmWarehouse.getLibTubeName());
patrolinspectionsheetInfoVo.setLiableSid(scmWarehouse.getLibTubeSid());
patrolinspectionsheetInfoVo.setRecordSid(recordSid);
return patrolinspectionsheetInfoVo;
}
List<AppLiableListVo> list = new ArrayList<>();
List<String> splitName = Arrays.asList(vo.getLiableName().split(","));
List<String> splitSid = Arrays.asList(vo.getLiableSid().split(","));
for (int i = 0; i < splitName.size(); i++) {
AppLiableListVo v = new AppLiableListVo();
v.setLiableName(splitName.get(i));
v.setLiableSid(splitSid.get(i));
list.add(v);
}
vo.setLiableList(list);
List<ScmFile> scmFiles1 = scmFileService.selectByLinkSid(vo.getSid(), type1);
if (scmFiles1.size() > 0) {
for (ScmFile scmFile : scmFiles1) {
@ -233,18 +225,18 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
public AppScmVehiclePatroVo getInspectionInfo(String recordSid) {
String type1 = "06"; // 巡检相关照片
AppScmVehiclePatroVo vo = baseMapper.getInspectionInfo(recordSid);
if (StringUtils.isNotBlank(vo.getLiableName())) {
List<AppLiableListVo> list = new ArrayList<>();
List<String> splitName = Arrays.asList(vo.getLiableName().split(","));
List<String> splitSid = Arrays.asList(vo.getLiableSid().split(","));
for (int i = 0; i < splitName.size(); i++) {
AppLiableListVo v = new AppLiableListVo();
v.setLiableName(splitName.get(i));
v.setLiableSid(splitSid.get(i));
list.add(v);
}
vo.setLiableList(list);
}
// if (StringUtils.isNotBlank(vo.getLiableName())) {
// List<AppLiableListVo> list = new ArrayList<>();
// List<String> splitName = Arrays.asList(vo.getLiableName().split(","));
// List<String> splitSid = Arrays.asList(vo.getLiableSid().split(","));
// for (int i = 0; i < splitName.size(); i++) {
// AppLiableListVo v = new AppLiableListVo();
// v.setLiableName(splitName.get(i));
// v.setLiableSid(splitSid.get(i));
// list.add(v);
// }
// vo.setLiableList(list);
// }
List<String> images = new ArrayList<>();
List<ScmFile> scmFiles1 = scmFileService.selectByLinkSid(vo.getSid(), type1);
if (scmFiles1.size() > 0) {
@ -299,15 +291,8 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
scmVehiclePatrolinspectionService.save(scmVehiclePatrolinspection);
BeanUtil.copyProperties(dto, scmVehiclePatrolinspectionsheet, "sid");
List<AppLiableListDto> liableList = dto.getLiableList();
String DutyName = "";
String DutySid = "";
for (AppLiableListDto appLiableListDto : liableList) {
DutyName = appLiableListDto.getLiableName() + "," + DutyName;
DutySid = appLiableListDto.getLiableSid() + "," + DutySid;
}
scmVehiclePatrolinspectionsheet.setDutyName(DutyName.substring(0, DutyName.length() - 1));
scmVehiclePatrolinspectionsheet.setDutySid(DutySid.substring(0, DutySid.length() - 1));
scmVehiclePatrolinspectionsheet.setDutyName(dto.getLiableName());
scmVehiclePatrolinspectionsheet.setDutySid(dto.getLiableSid());
scmVehiclePatrolinspectionsheet.setCreateOrgSid(useOrgSid);
scmVehiclePatrolinspectionsheet.setCreateBySid(dto.getUserSid());
scmVehiclePatrolinspectionsheet.setUseOrgSid(useOrgSid);
@ -330,11 +315,14 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
scmFileService.save(scmFile1);
}
List<String> receiveIdList = new ArrayList<>();
for (AppLiableListDto appLiableListDto : liableList) {
SysUserVo sysUserVos = sysUserFeign.fetchBySid(appLiableListDto.getLiableSid()).getData();
Integer id = sysUserVos.getId();
receiveIdList.add(String.valueOf(id));
}
List<AppLiableListDto> liableList = dto.getLiableList();
AppLiableListDto appLiableListDto = new AppLiableListDto();
appLiableListDto.setLiableName(dto.getLiableName());
appLiableListDto.setLiableSid(dto.getLiableSid());
liableList.add(appLiableListDto);
SysUserVo sysUserVos = sysUserFeign.fetchBySid(dto.getLiableSid()).getData();
Integer id = sysUserVos.getId();
receiveIdList.add(String.valueOf(id));
AppPatrolinspectionDto appPatrolinspectionDto = new AppPatrolinspectionDto();
appPatrolinspectionDto.setMsgContent(sysUserVo.getName());
appPatrolinspectionDto.setList(liableList);
@ -347,15 +335,8 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
BeanUtil.copyProperties(dto, scmVehiclePatrolinspectionsheet, "sid");
scmVehiclePatrolinspectionsheet.setCreateOrgSid(useOrgSid);
scmVehiclePatrolinspectionsheet.setCreateBySid(dto.getUserSid());
List<AppLiableListDto> liableList = dto.getLiableList();
String DutyName = "";
String DutySid = "";
for (AppLiableListDto appLiableListDto : liableList) {
DutyName = appLiableListDto.getLiableName() + "," + DutyName;
DutySid = appLiableListDto.getLiableSid() + "," + DutySid;
}
scmVehiclePatrolinspectionsheet.setDutyName(DutyName.substring(0, DutyName.length() - 1));
scmVehiclePatrolinspectionsheet.setDutySid(DutySid.substring(0, DutySid.length() - 1));
scmVehiclePatrolinspectionsheet.setDutyName(dto.getLiableName());
scmVehiclePatrolinspectionsheet.setDutySid(dto.getLiableSid());
scmFileService.deleteByLinkSidAndType(scmVehiclePatrolinspectionsheet.getSid(), type1);
List<String> images = dto.getImages();
for (String s : images) {
@ -372,11 +353,14 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
save(scmVehiclePatrolinspectionsheet);
scmVehiclePatrolinspectionService.updateByMainSid(oneKey, oneValue, newDate, sysUserVo.getName(), dto.getMainSid());
List<String> receiveIdList = new ArrayList<>();
for (AppLiableListDto appLiableListDto : liableList) {
SysUserVo sysUserVos = sysUserFeign.fetchBySid(appLiableListDto.getLiableSid()).getData();
Integer id = sysUserVos.getId();
receiveIdList.add(String.valueOf(id));
}
List<AppLiableListDto> liableList = dto.getLiableList();
AppLiableListDto appLiableListDto = new AppLiableListDto();
appLiableListDto.setLiableName(dto.getLiableName());
appLiableListDto.setLiableSid(dto.getLiableSid());
liableList.add(appLiableListDto);
SysUserVo sysUserVos = sysUserFeign.fetchBySid(dto.getLiableSid()).getData();
Integer id = sysUserVos.getId();
receiveIdList.add(String.valueOf(id));
AppPatrolinspectionDto appPatrolinspectionDto = new AppPatrolinspectionDto();
appPatrolinspectionDto.setMsgContent(sysUserVo.getName());
appPatrolinspectionDto.setList(liableList);
@ -589,17 +573,8 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
BaseVehicleVo vehicleVo = baseVehicleFeign.selVehicleByVinNo(dto.getVinNo()).getData();
patrolinspectionsheet.setModel(vehicleVo.getModelName());
patrolinspectionsheet.setModelSid(vehicleVo.getModelSid());
List<AppLiableListDto> liableList = dto.getLiableList();
if (liableList.size() > 0) {
String DutyName = "";
String DutySid = "";
for (AppLiableListDto appLiableListDto : liableList) {
DutyName = appLiableListDto.getLiableName() + "," + DutyName;
DutySid = appLiableListDto.getLiableSid() + "," + DutySid;
}
patrolinspectionsheet.setDutyName(DutyName.substring(0, DutyName.length() - 1));
patrolinspectionsheet.setDutySid(DutySid.substring(0, DutySid.length() - 1));
}
patrolinspectionsheet.setDutyName(dto.getLiableName());
patrolinspectionsheet.setDutySid(dto.getLiableSid());
scmFileService.deleteByLinkSidAndType(patrolinspectionsheet.getSid(), type1);
List<String> images = dto.getImages();
for (String s : images) {
@ -624,15 +599,8 @@ public class ScmVehiclePatrolinspectionsheetService extends MybatisBaseService<S
BaseVehicleVo vehicleVo = baseVehicleFeign.selVehicleByVinNo(dto.getVinNo()).getData();
patrolinspectionsheet.setModel(vehicleVo.getModelName());
patrolinspectionsheet.setModelSid(vehicleVo.getModelSid());
List<AppLiableListDto> liableList = dto.getLiableList();
String DutyName = "";
String DutySid = "";
for (AppLiableListDto appLiableListDto : liableList) {
DutyName = appLiableListDto.getLiableName() + "," + DutyName;
DutySid = appLiableListDto.getLiableSid() + "," + DutySid;
}
patrolinspectionsheet.setDutyName(DutyName.substring(0, DutyName.length() - 1));
patrolinspectionsheet.setDutySid(DutySid.substring(0, DutySid.length() - 1));
patrolinspectionsheet.setDutyName(dto.getLiableName());
patrolinspectionsheet.setDutySid(dto.getLiableSid());
scmFileService.deleteByLinkSidAndType(patrolinspectionsheet.getSid(), type1);
List<String> images = dto.getImages();
for (String s : images) {

4
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthMapper.java

@ -35,6 +35,7 @@ import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
@ -72,4 +73,7 @@ public interface ScmVehPatrolinspectionmonthMapper extends BaseMapper<ScmVehPatr
IPage<AppScmVehPatrolinspectionmonthVo> getCarInspectionReportList(IPage<AppScmVehPatrolinspectionmonthQuery> page, @Param(Constants.WRAPPER) QueryWrapper<AppScmVehPatrolinspectionmonthVo> qw, @Param("names") String names);
AppScmVehPatrolinspectionmonthInfoVo selByMainSid(String sid);
@Update(" update scm_veh_patrolinspectionmonth set `state` = '1' where sid=#{mainSid} ")
void updateBySidState(@Param("mainSid") String mainSid);
}

7
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionmonth/ScmVehPatrolinspectionmonthService.java

@ -30,6 +30,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.api.basevehicle.AppScmInventoryRecordsVo;
import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign;
import com.yxt.anrui.base.api.basevehicle.BaseVehicleVo;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg;
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
@ -187,7 +188,7 @@ public class ScmVehPatrolinspectionmonthService extends MybatisBaseService<ScmVe
vinNoList.add(vinNo);
}
if ("000".equals(patrolinspectionVo.getPatrolInspectionStateKey())) {
scmVehiclePatrolinspectionService.updatePatrolInspectionState(patrolinspectionVo.getSid());
scmVehiclePatrolinspectionService.updateState(patrolinspectionVo.getSid());
}
}
list = baseVehicleFeign.selectPatrolinspections(userSid, vinNoList).getData();
@ -337,4 +338,8 @@ public class ScmVehPatrolinspectionmonthService extends MybatisBaseService<ScmVe
public List<ScmVehPatrolinspectionmonthVo> selectListAll() {
return baseMapper.selectListAll();
}
public void updateBySidState(String mainSid) {
baseMapper.updateBySidState(mainSid);
}
}

19
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehpatrolinspectionreport/ScmVehPatrolinspectionreportService.java

@ -39,6 +39,7 @@ import com.yxt.anrui.scm.api.scmvehinventoryreport.RecipientListDto;
import com.yxt.anrui.scm.biz.scmvehiclepatrolinspection.ScmVehiclePatrolinspectionService;
import com.yxt.anrui.scm.biz.scmvehiclepatrolinspectionsheet.ScmVehiclePatrolinspectionsheetService;
import com.yxt.anrui.scm.biz.scmvehinventorymonth.ScmVehInventorymonthService;
import com.yxt.anrui.scm.biz.scmvehpatrolinspectionmonth.ScmVehPatrolinspectionmonthService;
import com.yxt.common.base.utils.JPushServer;
import com.yxt.messagecenter.api.message.AppMessageDto;
import com.yxt.messagecenter.api.message.MessageFeign;
@ -87,21 +88,10 @@ public class ScmVehPatrolinspectionreportService extends MybatisBaseService<ScmV
@Autowired
ScmVehiclePatrolinspectionService scmVehiclePatrolinspectionService;
@Autowired
ScmVehiclePatrolinspectionsheetService scmVehiclePatrolinspectionsheetService;
/**
* 消息类型:0002手机端
*/
public static final String IDENTIFIER = "0002";
@Autowired
ScmVehInventorymonthService scmVehInventorymonthService;
ScmVehPatrolinspectionmonthService scmVehPatrolinspectionmonthService;
@Autowired
private MessageFeign messageFeign;
@Autowired
private MessageTypeFeign messageTypeFeign;
@Autowired
private MessageListFeign messageListFeign;
ScmVehiclePatrolinspectionsheetService scmVehiclePatrolinspectionsheetService;
@Autowired
private SysUserFeign sysUserFeign;
@ -157,7 +147,7 @@ public class ScmVehPatrolinspectionreportService extends MybatisBaseService<ScmV
ResultBean rb = ResultBean.fireFail();
SysUserVo sysUserVo = sysUserFeign.fetchBySid(dto.getUserSid()).getData();
ScmVehPatrolinspectionreport scmVehPatrolinspectionreport = new ScmVehPatrolinspectionreport();
BeanUtil.copyProperties(dto, scmVehPatrolinspectionreport);
BeanUtil.copyProperties(dto, scmVehPatrolinspectionreport, "sid");
String StateKey1 = "001";
String StateKey2 = "002";
List<AppVinAndRemarksVo> questions1 = scmVehiclePatrolinspectionService.getMonthRemarksByMainSid(dto.getMainSid(), StateKey1);
@ -183,6 +173,7 @@ public class ScmVehPatrolinspectionreportService extends MybatisBaseService<ScmV
}
save(scmVehPatrolinspectionreport);
scmVehiclePatrolinspectionService.updateState(dto.getMainSid());
scmVehPatrolinspectionmonthService.updateBySidState(dto.getMainSid());
List<String> receiveIdList = new ArrayList<>();
List<AppLiableListDto> list = dto.getList();
for (AppLiableListDto appLiableListDto : list) {

6
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/AppScmVehiclePatrolinVo.java

@ -52,6 +52,12 @@ public class AppScmVehiclePatrolinVo implements Vo {
@ApiModelProperty("相关附件")
private List<String> images = new ArrayList<>();
@ApiModelProperty("相关责任人名称")
private String liableName;
@ApiModelProperty("相关责任人sid")
private String liableSid;
@ApiModelProperty("相关责任人")
private List<LiableListVo> liableList = new ArrayList<>();

6
anrui-terminal/anrui-terminal-api/src/main/java/com/yxt/anrui/terminal/api/supplychain/inspection/PatrolinspectionInfoVo.java

@ -33,6 +33,12 @@ public class PatrolinspectionInfoVo implements Vo {
@JsonProperty("result")
private String results;
@ApiModelProperty("相关责任人名称")
private String liableName;
@ApiModelProperty("相关责任人sid")
private String liableSid;
@ApiModelProperty("相关责任人")
private List<LiableListVo> liableList;

Loading…
Cancel
Save