Browse Source

移库修改

master
dimengzhe 3 years ago
parent
commit
ee1fdfe8e0
  1. 2
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionMapper.java
  2. 81
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionMapper.xml
  3. 23
      anrui-scm/anrui-scm-biz/src/main/java/com/yxt/anrui/scm/biz/scmvehiclegression/ScmVehicleGressionService.java

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

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

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

@ -5,29 +5,34 @@
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionVo">
SELECT * FROM scm_vehicle_gression
<where>${ew.sqlSegment}</where>
SELECT *
FROM scm_vehicle_gression
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectListAllVo" resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionVo">
SELECT * FROM scm_vehicle_gression
<where>${ew.sqlSegment}</where>
SELECT *
FROM scm_vehicle_gression
<where>
${ew.sqlSegment}
</where>
</select>
<select id="selectCarTransferList"
resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionPageVo">
SELECT
svg.sid,
svg.vinNo as vin,
svg.applicantNo as applyId,
if(length(svg.nodeState) > 0, nodeState, '待提交') as `state`,
svg.applicantName as applyName,
svg.applicantDate as applyDate,
svg.applicantFunds as applyPrice,
svg.temporaryCard as downloadUrl,
svg.location,
svg.targetLocation,
svg.operator
SELECT svg.sid,
svg.vinNo as vin,
svg.applicantNo as applyId,
if(length(svg.nodeState) > 0, nodeState, '待提交') as `state`,
svg.applicantName as applyName,
svg.applicantDate as applyDate,
svg.applicantFunds as applyPrice,
svg.temporaryCard as downloadUrl,
svg.location,
svg.targetLocation,
svg.operator
FROM scm_vehicle_gression svg
<where>
${ew.sqlSegment}
@ -37,24 +42,26 @@
<select id="getCarTransferList"
resultType="com.yxt.anrui.scm.api.scmvehiclegression.AppScmVehicleGressionPageVo">
SELECT
svg.sid,
svg.vinNo as vin,
svg.applicantNo as applyId,
if(length(svg.nodeState) > 0, nodeState, '待提交') as `state`,
if(length(svg.nodeState) > 0, false , true) as showDetectBtn,
if(length(svg.nodeState) > 0, false , true) as showUpdateBtn,
if(length(svg.nodeState) > 0, true , false) as showUploadBtn,
if(length(svg.nodeState) > 0, true , false) as showDownloadBtn,
svg.applicantName as applyName,
svg.applicantDate as applyDate,
svg.applicantFunds as applyPrice,
svg.temporaryCard as downloadUrl
SELECT svg.sid,
svg.vinNo as vin,
svg.applicantNo as applyId,
if(length(svg.nodeState) > 0, nodeState, '待提交') as `state`,
if(length(svg.nodeState) > 0, false, true) as showDetectBtn,
if(length(svg.nodeState) > 0, false, true) as showUpdateBtn,
if(length(svg.nodeState) > 0, true, false) as showUploadBtn,
if(length(svg.nodeState) > 0, true, false) as showDownloadBtn,
svg.applicantName as applyName,
svg.applicantDate as applyDate,
svg.applicantFunds as applyPrice,
svg.temporaryCard as downloadUrl
FROM scm_vehicle_gression svg
<where>
${ew.sqlSegment}
<if test="names != '' and names != null ">
and concat(svg.applicantNo,svg.vinNo) LIKE concat('%', #{names}, '%')
<if test="names != '' and names != null">
and concat(svg.applicantNo
, svg.vinNo) LIKE concat('%'
, #{names}
, '%')
</if>
</where>
ORDER BY id DESC
@ -90,11 +97,12 @@
and find_in_set(sid, #{list})
</select>
<select id="selectNum" resultType="java.lang.Integer">
select RIGHT (applicantNo, 4)
<select id="selectNum" resultType="java.lang.String">
select RIGHT(applicantNo, 4)
from scm_vehicle_gression
where applicantNo LIKE concat(#{bill}, '%')
order by id desc limit 1
order by id desc
limit 1
</select>
<select id="getlastTimeEqual" resultType="com.yxt.anrui.scm.api.scmvehiclegression.ScmVehicleGressionVo">
@ -103,14 +111,15 @@
where vinNo = #{vinNo}
and targetLocationSid = #{targetLocationSid}
and LENGTH(nodeState) > 0
order by id desc limit 1
order by id desc
limit 1
</select>
<update id="updateFlowFiled">
UPDATE scm_vehicle_gression
SET nodeState=#{nodeState}
, nodeId=#{taskDefKey}
, nodeId=#{taskDefKey}
<if test="procDefId != null and procDefId != ''">
, procDefId=#{procDefId}
</if>

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

@ -29,11 +29,11 @@ import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.anrui.base.api.basevehicle.*;
import com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModel;
import com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelDetailsVo;
import com.yxt.anrui.base.api.basevehicle.BaseVehicleFeign;
import com.yxt.anrui.base.api.basevehicle.BaseVehicleSelectVo;
import com.yxt.anrui.base.api.basevehicle.ExiCarConfigDetailVo;
import com.yxt.anrui.base.api.basevehicle.VehicleGression;
import com.yxt.anrui.base.api.basevehiclemodel.BaseVehicleModelFeign;
import com.yxt.anrui.base.api.busvehicleapply.BusVehicleApplyDto;
import com.yxt.anrui.base.common.enums.BillTypeEnum;
import com.yxt.anrui.base.common.utils.Rule;
import com.yxt.anrui.base.common.utils.domain.BillNo;
@ -44,7 +44,6 @@ import com.yxt.anrui.flowable.api.flowtask.FlowTaskVo;
import com.yxt.anrui.flowable.api.utils.ProcDefEnum;
import com.yxt.anrui.flowable.sqloperationsymbol.BusinessVariables;
import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign;
import com.yxt.anrui.portal.api.dictcommon.DictCommonVo;
import com.yxt.anrui.portal.api.sysorganization.SysOrganization;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign;
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo;
@ -54,13 +53,11 @@ import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserFeign;
import com.yxt.anrui.portal.api.sysuser.SysUserVo;
import com.yxt.anrui.portal.api.sysuser.app.AppUserOrgInfoVo;
import com.yxt.anrui.portal.config.DictCommonType;
import com.yxt.anrui.scm.api.scmfile.ScmFile;
import com.yxt.anrui.scm.api.scmvehiclegression.*;
import com.yxt.anrui.scm.biz.scmfile.ScmFileService;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.DateUtils;
import com.yxt.common.base.utils.PagerUtil;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
@ -362,10 +359,11 @@ 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);
}
updateById(scmVehicleGression);
}
return rb.success().setData(scmVehicleGression.getSid()).setMsg("保存成功");
}
@ -493,8 +491,13 @@ public class ScmVehicleGressionService extends MybatisBaseService<ScmVehicleGres
b.setOrgCode(orgCode);
b.setBillType(BillTypeEnum.KCDDBGSQ.getBillType());
String bill = Rule.getBill(b);
int i = baseMapper.selectNum(bill);
String billNo = Rule.getBillNo(bill, i);
String i = baseMapper.selectNum(bill);
String billNo = "";
if(StringUtils.isNotBlank(i)){
billNo = Rule.getBillNo(bill, Integer.valueOf(i).intValue());
}else{
billNo = Rule.getBillNo(bill, 0);
}
return billNo;
}

Loading…
Cancel
Save