Browse Source

移库申请问题修改

zhanglei
hanlinghao 3 years ago
parent
commit
15ed7a3534
  1. 11
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDelivered.java
  2. 2
      anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java
  3. 2
      anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/ScmVehicleGressionVo.java
  4. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionMapper.java
  5. 13
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionMapper.xml
  6. 33
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java
  7. 9
      anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/retrieval/AppBusDeliveredApplyService.java

11
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdelivered/BusDelivered.java

@ -26,6 +26,7 @@
package com.yxt.anrui.buscenter.api.busdelivered;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.yxt.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ -50,8 +51,14 @@ import lombok.Data;
public class BusDelivered extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty("类型:1车款交清、2欠款提车")
private Integer type;
@ApiModelProperty("类型 1 已认款 2 未认款")
private String subscription;
@ApiModelProperty("类型 1 已认款 2 未认款")
private String subscriptionKey;
@ApiModelProperty("付款方式 1 全款 2 贷款")
private String paymentMethod;
@ApiModelProperty("付款方式 1 全款 2 贷款")
private String paymentMethodKey;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("客户名称")

2
anrui-flowable/anrui-flowable-api/src/main/java/com/yxt/anrui/flowable/api/utils/ProcDefEnum.java

@ -23,7 +23,7 @@ public enum ProcDefEnum {
BASEOUTSOURCINGAPPLICATION("外采申请", "process_5tqysnjc:3:365004"),//TODO
BASEMODELMODPRICE("车型调价申请", "process_kydcif7k:5:280004"),
BASEINTERNALPURCHASE("调车申请", "process_i6luw5xq:2:315150"),
SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:4:300008"), //TODO
SCMCARTRANSFER("库存地点变更申请", "process_3bc4p2em:5:382504"), //TODO
FINCOSTAPPLY("费用申请","process_u0pahv0s:4:320016"),
FINPAYAPPLY("付款申请","process_gin2tntb:2:320012"),
BUSDELIVEREDAPPLY("出库申请","process_wgt1n66l:2:357504"),

2
anrui-scm/anrui-scm-api/src/main/java/com/yxt/anrui/scm/api/scmvehiclegression/ScmVehicleGressionVo.java

@ -71,5 +71,7 @@ public class ScmVehicleGressionVo implements Vo {
private String InsuranceState; // 保险状态
@ApiModelProperty("临牌")
private String temporaryCard; // 临牌
@ApiModelProperty("审核状态")
private String nodeState;
}

2
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionMapper.java

@ -113,4 +113,6 @@ public interface ScmVehicleGressionMapper extends BaseMapper<ScmVehicleGression>
void updateStateBySid(@Param("sid") String sid, @Param("state") String state);
int selectNum(String bill);
List<ScmVehicleGressionVo> getlastTimeEqual(@Param("vinNo") String vinNo, @Param("targetLocationSid") String targetLocationSid);
}

13
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionMapper.xml

@ -91,11 +91,22 @@
</select>
<select id="selectNum" resultType="java.lang.Integer">
select count(*)
select RIGHT (applicantNo, 4)
from scm_vehicle_gression
where applicantNo LIKE concat(#{bill}, '%')
order by id desc limit 1
</select>
<select id="getlastTimeEqual" resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionVo">
select *
from scm_vehicle_gression
where vinNo = #{vinNo}
and targetLocationSid = #{targetLocationSid}
and LENGTH(nodeState) > 0
order by id desc limit 1
</select>
<update id="updateFlowFiled">
UPDATE scm_vehicle_gression
SET nodeState=#{nodeState}

33
anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java

@ -201,8 +201,11 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
*/
private QueryWrapper<ScmVehicleGressionPageVo> pcQueryWrapper(ScmVehicleGressionPageQuery query) {
QueryWrapper<ScmVehicleGressionPageVo> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(query.getUseOrgSid())) {
qw.eq("svg.useOrgSid", query.getUseOrgSid());
// if (StringUtils.isNotBlank(query.getUseOrgSid())) {
// qw.eq("svg.useOrgSid", query.getUseOrgSid());
// }
if (StringUtils.isNotBlank(query.getUserSid())) {
qw.eq("svg.createBySid", query.getUserSid());
}
if (StringUtils.isNotBlank(query.getType())) {
qw.eq("svg.handleState", query.getType());
@ -259,8 +262,11 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
*/
private QueryWrapper<AppScmVehicleGressionPageVo> appQueryWrapper(AppScmVehicleGressionPageQuery query) {
QueryWrapper<AppScmVehicleGressionPageVo> qw = new QueryWrapper<>();
if (StringUtils.isNotBlank(query.getUseOrgSid())) {
qw.eq("svg.useOrgSid", query.getUseOrgSid());
// if (StringUtils.isNotBlank(query.getUseOrgSid())) {
// qw.eq("svg.useOrgSid", query.getUseOrgSid());
// }
if (StringUtils.isNotBlank(query.getUserSid())) {
qw.eq("svg.createBySid", query.getUserSid());
}
if (StringUtils.isNotBlank(query.getType())) {
qw.eq("svg.handleState", query.getType());
@ -306,12 +312,12 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
scmVehicleGression.setApplicantDate(simpleDateFormat.format(new Date()));
scmVehicleGression.setOrgSid(data.getOrgSid());
scmVehicleGression.setUseOrgSid(useOrgSid);
scmVehicleGression.setCreateBySid(dto.getUserSid());
//申请编号规则:单据名称大写首字母+分公司编码+年份+月份+4位顺序号
//获取单据名称大写首字母+分公司编码+年份+月份
// Map<String, String> stringStringMap = generateBillNo(userSid);
String billNo = getApplyCode(dto);
scmVehicleGression.setApplicantNo(billNo);
save(scmVehicleGression);
if ("1".equals(dto.getInsuranceStateKey())) { // 如果保单状态为否 不保存保单照片
List<String> factoryImage = dto.getPolicyImage();
if (factoryImage.size() <= 0) {
@ -332,13 +338,13 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
} else if ("0".equals(dto.getInsuranceStateKey())) {
scmFileService.deleteByLinkSidAndType(scmVehicleGression.getSid(), type);
}
save(scmVehicleGression);
} else {
scmVehicleGression = fetchBySid(dto.getSid());
if (scmVehicleGression == null) {
return rb.setMsg("该数据不存在");
}
BeanUtil.copyProperties(dto, scmVehicleGression, "sid");
updateById(scmVehicleGression);
if ("1".equals(dto.getInsuranceStateKey())) { // 如果保单状态为否 不保存保单照片
List<String> factoryImage = dto.getPolicyImage();
if (factoryImage.size() <= 0) {
@ -356,6 +362,7 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
scmFile.setLinkSid(scmVehicleGression.getSid());
scmFileService.save(scmFile);
}
updateById(scmVehicleGression);
} else if ("0".equals(dto.getInsuranceStateKey())) {
scmFileService.deleteByLinkSidAndType(scmVehicleGression.getSid(), type);
}
@ -565,6 +572,14 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
if (r == 0) {
return rb.setMsg("操作失败!提交的数据不一致");
}
List<ScmVehicleGressionVo> scmVehicleGressionVos = baseMapper.getlastTimeEqual(dto.getVinNo(), dto.getTargetLocationSid());
if (scmVehicleGressionVos.size() > 0) {
if (StringUtils.isNotBlank(scmVehicleGressionVos.get(0).getNodeState())) {
if (!(scmVehicleGressionVos.get(0).getNodeState().contains("已办结") || scmVehicleGressionVos.get(0).getNodeState().contains("已终止") || scmVehicleGressionVos.get(0).getNodeState().contains("申请"))) {
return rb.setMsg("该申请已存在,请务重复提交!");
}
}
}
//新增修改保存
ResultBean<String> resultBean = saveCarTransferInfo(dto);
if (!resultBean.getSuccess()) {
@ -742,6 +757,9 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
*/
public ResultBean taskReject(ScmCarTransferTaskQuery query) {
ResultBean rb = ResultBean.fireFail();
if (StringUtils.isBlank(query.getComment())) {
return rb.setMsg("意见不能为空");
}
ScmVehicleGression scmVehicleGression = fetchBySid(query.getBusinessSid());
if (scmVehicleGression == null) {
return rb.setMsg("该申请不存在");
@ -809,6 +827,9 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
if (StringUtils.isBlank(query.getUserSid())) {
return rb.setMsg("参数错误:userSid");
}
if (StringUtils.isBlank(query.getComment())) {
return rb.setMsg("意见不能为空");
}
ScmVehicleGression scmVehicleGression = fetchBySid(query.getBusinessSid());
String businessTaskId = scmVehicleGression.getTaskId();
if (StringUtils.isNotBlank(businessTaskId)) {

9
anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/autoservice/retrieval/AppBusDeliveredApplyService.java

@ -29,6 +29,7 @@ import cn.hutool.core.bean.BeanUtil;
import com.yxt.anrui.buscenter.api.busdelivered.*;
import com.yxt.anrui.buscenter.api.busdeliveredapply.*;
import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.AppCarVinListVo;
import com.yxt.anrui.buscenter.api.busdeliveredapplydetails.BusDeliveredApplyDetailsFeign;
import com.yxt.anrui.scm.api.scmvehiclegression.AppScmVehicleGressionPageQuery;
import com.yxt.anrui.scm.api.scmvehiclestaypatrolinspection.AppScmVehicleStayPatrolinspectionPageQuery;
import com.yxt.anrui.terminal.api.autoservice.retrieval.*;
@ -68,6 +69,9 @@ public class AppBusDeliveredApplyService {
@Autowired
BusDeliveredApplyFeign busDeliveredApplyFeign;
@Autowired
BusDeliveredApplyDetailsFeign busDeliveredApplyDetailsFeign;
public ResultBean<PagerVo<DeliveredPageVo>> getRetrievalNotList(PagerQuery<DeliveredPageQuery> pagerQuery) {
ResultBean<PagerVo<DeliveredPageVo>> rb = ResultBean.fireFail();
PagerQuery<AppBusDeliveredPageQuery> pq = CoverUtils.getPagerQuery(pagerQuery);
@ -115,6 +119,9 @@ public class AppBusDeliveredApplyService {
}
public ResultBean<List<AppCarVinListVo>> getRetrievalCarVin(String sid) {
return null;
ResultBean<List<AppCarVinListVo>> rb = ResultBean.fireFail();
ResultBean<List<AppCarVinListVo>> retrievalCarVin = busDeliveredApplyDetailsFeign.getRetrievalCarVin(sid);
List<AppCarVinListVo> data = retrievalCarVin.getData();
return rb.success().setData(data);
}
}
Loading…
Cancel
Save