下架正式接口:
当[(库存数量-出库通知档数量) < 下架数量]时不允许下架
| | |
| | | logger.error("SAP Retrieve Interface Error-----下架指令接收失败" + sloc_no + "库存数量小于下架数量--" + vsolm); |
| | | continue; |
| | | } |
| | | // (库存数量-出库通知档数量) < 下架数量 |
| | | List<WaitPakOutBean> waitPakOutBeanList = waitPakOutService.queryWaitOutPak(locDetailBean.getLoc_no(), locDetailBean.getMatnr()); |
| | | if (waitPakOutBeanList.size() > 0) { |
| | | Double realAnfme = new Double(locDetailBean.getAnfme() - waitPakOutBeanList.get(0).getVsolm()); |
| | | if (realAnfme < vsolm) { |
| | | jsonRet.put("lgnum", job.get("lgnum").toString()); |
| | | jsonRet.put("tanum", job.get("tanum").toString().equals("")?0:Integer.parseInt(job.get("tanum").toString())); |
| | | jsonRet.put("tapos", job.get("tapos").toString().equals("")?0:Integer.parseInt(job.get("tapos").toString())); |
| | | jsonRet.put("zstatus", "E"); |
| | | jsonRet.put("message", "下架指令接收失败," + sloc_no + "库存数量小于下架数量--" + vsolm); |
| | | arrRet.add(jsonRet); |
| | | logger.error("SAP Retrieve Interface Error-----下架指令接收失败" + sloc_no + "库存数量小于下架数量--" + vsolm); |
| | | continue; |
| | | } |
| | | } |
| | | String nltyp=job.get("vlpla").toString(); |
| | | String dloc_no=job.get("nlpla").toString(); |
| | | if(nltyp.equals("A01") && dloc_no!=null && !dloc_no.equals("")) { |
| | |
| | | public Integer waitPakOutSetEms(@Param("lgnum") String lgnum, @Param("tanum") int tanum, @Param("tapos") int tapos); |
| | | |
| | | public Integer countEmsNum(); |
| | | |
| | | public List<WaitPakOutBean> queryWaitOutPak(@Param("vlpla") String vlpla, @Param("matnr") String matnr); |
| | | |
| | | // //统计所有数据总数量 |
| | | // @Select("select count(*) from cust_wait_pakout") |
| | |
| | | public Integer waitPakOutSetEms(SetEmsParam waitPakOutCon); |
| | | |
| | | public Integer countEmsNum(); |
| | | |
| | | public List<WaitPakOutBean> queryWaitOutPak(String vlpla, String matnr); |
| | | |
| | | //根据id查询 |
| | | public WaitPakOutBean queryWaitPakOutById(String sheet_no,String mat_no); |
| | |
| | | import java.util.Map; |
| | | |
| | | import com.slcf.controller.param.SetEmsParam; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | return WaitPakOutDao.countEmsNum(); |
| | | } |
| | | |
| | | public List<WaitPakOutBean> queryWaitOutPak(String vlpla, String matnr) { |
| | | return WaitPakOutDao.queryWaitOutPak(vlpla, matnr); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | */ |
| | |
| | | select count(*) from cust_wait_pakout where ems_status = 1 |
| | | </select> |
| | | |
| | | <select id="queryWaitOutPak" resultType="com.slcf.pojo.WaitPakOutBean"> |
| | | select * from cust_wait_pakout where vlpla = #{vlpla} and matnr = #{matnr} |
| | | </select> |
| | | |
| | | <select id="getWaitPakOutCount" parameterType="com.slcf.bean.WaitPakOutCondition" resultType="Integer"> |
| | | select count(1) from cust_wait_pakout a |
| | | <where> |