Browse Source

出库申请审核bug修改

master
hanlinghao 3 years ago
parent
commit
a2d3314b63
  1. 4
      anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyVo.java
  2. 9
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyMapper.xml
  3. 15
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java

4
anrui-buscenter/anrui-buscenter-api/src/main/java/com/yxt/anrui/buscenter/api/busdeliveredapply/BusDeliveredApplyVo.java

@ -51,7 +51,7 @@ public class BusDeliveredApplyVo implements Vo {
private static final long serialVersionUID = -5288930043107860764L;
private String sid;
@ApiModelProperty(value = "状态")
private String state;
private String nodeState;
@ApiModelProperty("合同编号")
private String contractNo;
@ApiModelProperty("客户名称")
@ -64,8 +64,6 @@ public class BusDeliveredApplyVo implements Vo {
private String taskId;
@ApiModelProperty(value = "流程实例id")
private String procInstId;
@ApiModelProperty(value = "显示撤回按钮")
private boolean revokeState;
}

9
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyMapper.xml

@ -5,12 +5,7 @@
<!-- ${ew.customSqlSegment} -->
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.busdeliveredapply.BusDeliveredApplyVo">
SELECT bd.sid,
case bd.state
when 1 then '待提交'
when 2 then '待审核'
when 3 then '已通过'
when 4 then '未通过' end as state,
if(bd.state = 2, true,false) as revokeState,
if(length(bd.nodeState) > 0, nodeState, '待提交') as nodeState,
bd.contractNo,
bd.name,
bd.taskId,
@ -31,7 +26,7 @@
</update>
<select id="selectState" resultType="java.lang.Boolean">
select if(state = '1', 'true', 'false')
select if(length(nodeState) > 0, 'false','true')
from bus_delivered_apply where sid in
<foreach item="sid" collection="sidsList" open="(" separator="," close=")">
#{sid}

15
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/busdeliveredapply/BusDeliveredApplyService.java

@ -141,6 +141,9 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
*/
public ResultBean saveOrUpdateDto(BusDeliveredApplyDto dto) {
ResultBean rb = ResultBean.fireFail();
if (dto.getDetailsList().size() <= 0) {
return rb.setMsg("请选择车辆信息!!!");
}
String dtoSid = dto.getSid();
if (StringUtils.isBlank(dtoSid)) {
//新增
@ -174,11 +177,6 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
busDeliveredApplyDetailsService.saveList(dtoList, busDeliveredApply.getSid());
}
}
List<String> stringList = busDeliveredApplyDetailsService.selectVinByApplySid(dtoSid);
for (int i = 0; i < stringList.size(); i++) {
String vinNo = stringList.get(i);
busDeliveredService.updateState(vinNo, 0);
}
return rb.success().setData(dtoSid);
}
@ -452,8 +450,13 @@ public class BusDeliveredApplyService extends MybatisBaseService<BusDeliveredApp
if (!resultBean.getSuccess()) {
return rb.setMsg(resultBean.getMsg());
}
//更改状态
String sid = resultBean.getData();
//更改状态
List<String> stringList = busDeliveredApplyDetailsService.selectVinByApplySid(sid);
for (int i = 0; i < stringList.size(); i++) {
String vinNo = stringList.get(i);
busDeliveredService.updateState(vinNo, 0);
}
baseMapper.updateStateBySid(2, sid, DateUtil.date());
String businessSid = resultBean.getData();
//创建BusinessVariables实体对象

Loading…
Cancel
Save