| | |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.common.web.BaseController; |
| | | import com.zy.nc.entity.NccJcQilibcBarcodeflowWms; |
| | | import com.zy.nc.entity.NccXsckmxTkWms; |
| | | import com.zy.nc.service.NccJcQilibcBarcodeflowWmsService; |
| | | import com.zy.nc.service.NccXsckmxTkWmsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @Autowired |
| | | private OrderDetlPakinService orderDetlPakinService; |
| | | |
| | | @Autowired |
| | | private NccXsckmxTkWmsService nccXsckmxTkWmsService; |
| | | |
| | | @RequestMapping("/pda/WarehouseOut/v1") |
| | | @ManagerAuth(memo = "并板途中拣料-参考念初") |
| | |
| | | return R.ok().add(matParam); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/back") |
| | | @ManagerAuth |
| | | public R pdaSearchBack(@RequestParam String matnr) { |
| | | EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("VBATCHCODE", matnr); |
| | | NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper); |
| | | if (null == nccXsckmxTkWms) { |
| | | return R.error("未找到此条码"); |
| | | } |
| | | Mat mat = matService.selectByMatnr(nccXsckmxTkWms.getWlbm()); |
| | | MatParam matParam = new MatParam(); |
| | | Synchro.Copy(mat, matParam); |
| | | matParam.setBatch(nccXsckmxTkWms.getVbatchcode()); |
| | | matParam.setAnfme(0.0D); |
| | | matParam.setAnfme2(0.0D); |
| | | matParam.setTiaoma(matnr); |
| | | return R.ok().add(matParam); |
| | | } |
| | | |
| | | @RequestMapping("/comb/auth") |
| | | @ManagerAuth(memo = "组托") |
| | | public R comb(@RequestBody CombParam combParam) { |
| | |
| | | locDto.setBoxType1(orderDetl.getBoxType1()); |
| | | locDto.setBoxType2(orderDetl.getBoxType2()); |
| | | locDto.setBoxType3(orderDetl.getBoxType3()); |
| | | locDto.setWeight(orderDetl.getWeight()); |
| | | |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | |
| | | locDto.setBoxType1(orderDetl.getBoxType1()); |
| | | locDto.setBoxType2(orderDetl.getBoxType2()); |
| | | locDto.setBoxType3(orderDetl.getBoxType3()); |
| | | locDto.setWeight(orderDetl.getWeight()); |
| | | locDto.setLack(Boolean.TRUE); |
| | | locDtos.add(locDto); |
| | | } |
| | |
| | | locDto.setBoxType1(orderDetl.getBoxType1()); |
| | | locDto.setBoxType2(orderDetl.getBoxType2()); |
| | | locDto.setBoxType3(orderDetl.getBoxType3()); |
| | | locDto.setWeight(orderDetl.getWeight()); |
| | | locDtos.add(locDto); |
| | | exist.add(locDetl.getLocNo()); |
| | | // 剩余待出数量递减 |
| | |
| | | locDto.setBoxType1(orderDetl.getBoxType1()); |
| | | locDto.setBoxType2(orderDetl.getBoxType2()); |
| | | locDto.setBoxType3(orderDetl.getBoxType3()); |
| | | locDto.setWeight(orderDetl.getWeight()); |
| | | locDto.setLack(Boolean.TRUE); |
| | | locDtos.add(locDto); |
| | | } |
| | |
| | | @TableField("box_type3") |
| | | private String boxType3 = ""; |
| | | |
| | | /** |
| | | * 退库标记 |
| | | */ |
| | | @ApiModelProperty(value= "退库标记") |
| | | @TableField("tk_flag") |
| | | private String tkFlag = ""; |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | |
| | | @TableField("box_type3") |
| | | private String boxType3 = ""; |
| | | |
| | | /** |
| | | * 退库标记 |
| | | */ |
| | | @ApiModelProperty(value= "退库标记") |
| | | @TableField("tk_flag") |
| | | private String tkFlag = ""; |
| | | |
| | | public String getBeBatch$(){ |
| | | if (null == this.beBatch){ return null; } |
| | | switch (this.beBatch){ |
| | |
| | | // 库位编号 |
| | | private String locNo; |
| | | |
| | | //退库组托 |
| | | private String tkFlag; |
| | | |
| | | |
| | | private List<CombMat> combMats; |
| | | |
| | |
| | | @Param("brand")String brand,@Param("standby1")String standby1,@Param("standby2")String standby2, |
| | | @Param("standby3")String standby3,@Param("boxType1")String boxType1,@Param("boxType2")String boxType2,@Param("boxType3")String boxType3 ); |
| | | |
| | | int updateWeight(@Param("weight")Double weight, @Param("locNo")String locNo, @Param("matnr")String matnr, @Param("batch")String batch, |
| | | @Param("brand")String brand,@Param("standby1")String standby1,@Param("standby2")String standby2, |
| | | @Param("standby3")String standby3,@Param("boxType1")String boxType1,@Param("boxType2")String boxType2,@Param("boxType3")String boxType3 ); |
| | | |
| | | |
| | | List<LocDetl> getStockOutPage(Map<String, Object> map); |
| | | |
| | | Integer getStockOutPageCount(Map<String, Object> map); |
| | |
| | | public interface ReportToThirdService { |
| | | |
| | | void report(Order order, List<OrderDetl> orderDetls, DocType docType) throws Exception; |
| | | |
| | | void reportTkrk(String batch, Double anfme); |
| | | |
| | | } |
| | |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.FrozenParam; |
| | | import com.zy.asrs.entity.LocDetl; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.result.LocDetlAll; |
| | | import com.zy.asrs.entity.result.LocDetlDTO; |
| | | import com.zy.asrs.entity.result.StockVo; |
| | | import com.zy.asrs.mapper.LocDetlMapper; |
| | | import com.zy.asrs.service.LocDetlService; |
| | | import com.zy.asrs.service.MatService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | |
| | | @Service("locDetlService") |
| | | public class LocDetlServiceImpl extends ServiceImpl<LocDetlMapper, LocDetl> implements LocDetlService { |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @Override |
| | | public Page<LocDetl> getPage(Page<LocDetl> page) { |
| | |
| | | if (anfme <= 0) { |
| | | return this.baseMapper.deleteItem(locNo, matnr, batch, brand, standby1, standby2, standby3, boxType1, boxType2, boxType3) > 0; |
| | | } else { |
| | | return baseMapper.updateAnfme(anfme, locNo, matnr, batch, brand, standby1, standby2, standby3, boxType1, boxType2, boxType3) > 0; |
| | | boolean result = baseMapper.updateAnfme(anfme, locNo, matnr, batch, brand, standby1, standby2, standby3, boxType1, boxType2, boxType3) > 0; |
| | | if (!result) { |
| | | return false; |
| | | } |
| | | |
| | | //更新辅料 |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (mat == null) { |
| | | return false; |
| | | } |
| | | |
| | | //转换关系 |
| | | String origin = mat.getOrigin(); |
| | | String[] split = origin.split("/"); |
| | | //辅单位 |
| | | Double weight = (anfme / Double.parseDouble(split[1])) / Double.parseDouble(split[0]); |
| | | return this.baseMapper.updateWeight(weight, locNo, matnr, batch, brand, standby1, standby2, standby3, boxType1, boxType2, boxType3) > 0; |
| | | } |
| | | } |
| | | |
| | |
| | | waitPakin.setStandby1(detlDto.getStandby1()); |
| | | waitPakin.setStandby2(detlDto.getStandby2()); |
| | | waitPakin.setStandby3(detlDto.getStandby3()); |
| | | waitPakin.setTkFlag(param.getTkFlag()); |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.core.common.R; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.DocType; |
| | | import com.zy.asrs.entity.Order; |
| | |
| | | import com.zy.asrs.service.StoreTypeService; |
| | | import com.zy.nc.SendUtil; |
| | | import com.zy.nc.entity.*; |
| | | import com.zy.nc.service.NccSaleXsfhmxWmsService; |
| | | import com.zy.nc.service.NccScPcdaWmsService; |
| | | import com.zy.nc.service.NccXsckmxTkWmsService; |
| | | import com.zy.nc.util.NcResultMessage; |
| | | import com.zy.nc.vo.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | private NccScPcdaWmsService nccScPcdaWmsService; |
| | | |
| | | @Autowired |
| | | private NccXsckmxTkWmsService nccXsckmxTkWmsService; |
| | | |
| | | @Autowired |
| | | private NccSaleXsfhmxWmsService nccSaleXsfhmxWmsService; |
| | | |
| | | @Value("${NYNC.ip}") |
| | | private String nyncIp; |
| | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void reportTkrk(String batch, Double anfme) { |
| | | Object process1 = processTKRK(batch, anfme); |
| | | //发送请求 |
| | | NcResultMessage response = SendUtil.sendDataToNc(SendUtil.token, nyncIp + ":" + port, saveRefDelivery, JSONObject.toJSONString(process1)); |
| | | log.info("销售发货response:{}", response); |
| | | // if (!Cools.isEmpty(response) && response.isSuccess()) { |
| | | // log.info("销售发货response:{}", response); |
| | | // } else { |
| | | // remark = response.getMessage() + "--" + response.getErrorStack().substring(0, 100); |
| | | // } |
| | | } |
| | | |
| | | private Object processXSFH(List<OrderDetl> orderDetls, Boolean flag) { |
| | | //组装对象数据 |
| | |
| | | return data; |
| | | } |
| | | |
| | | private Object processTKRK(String batch, Double anfme) { |
| | | EntityWrapper<NccXsckmxTkWms> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("VBATCHCODE", batch); |
| | | NccXsckmxTkWms nccXsckmxTkWms = nccXsckmxTkWmsService.selectOne(wrapper); |
| | | if (null == nccXsckmxTkWms) { |
| | | throw new CoolException("未找到此条码"); |
| | | } |
| | | |
| | | NccSaleXsfhmxWms nccSaleXsfhmxWms = nccSaleXsfhmxWmsService.selectOne(new EntityWrapper<NccSaleXsfhmxWms>() |
| | | .eq("VBILLCODE", nccXsckmxTkWms.getVsourcebillcode())); |
| | | if(null == nccSaleXsfhmxWms) { |
| | | throw new CoolException("未找到销售单据"); |
| | | } |
| | | |
| | | //组装对象数据 |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | | SaleOutHeadVO saleOutHeadVO = new SaleOutHeadVO(); |
| | | saleOutHeadVO.setPk_org("FYT"); |
| | | SaleOutBodyVO saleOutBodyVO = null; |
| | | List<SaleOutBodyVO> saleOutBodyVOList = new ArrayList<>(); |
| | | |
| | | saleOutBodyVO = new SaleOutBodyVO(); |
| | | saleOutBodyVO.setCsourcetype("4331"); |
| | | saleOutBodyVO.setCsourcebillbid(nccXsckmxTkWms.getCsourcebillbid()); |
| | | saleOutBodyVO.setCsourcebillhid(nccXsckmxTkWms.getCsourcebillhid()); |
| | | saleOutHeadVO.setCwarehouseid(nccSaleXsfhmxWms.getFhckbm()); |
| | | |
| | | saleOutBodyVO.setVbatchcode(nccXsckmxTkWms.getVbatchcode()); |
| | | saleOutBodyVO.setNshouldnum(anfme * -1); |
| | | saleOutBodyVO.setNnum(anfme * -1); |
| | | saleOutBodyVOList.add(saleOutBodyVO); |
| | | |
| | | data.put("SaleOutHeadVO", saleOutHeadVO); |
| | | data.put("SaleOutBodyVO", saleOutBodyVOList); |
| | | return data; |
| | | } |
| | | |
| | | private Object processZKRK(List<OrderDetl> orderDetls) { |
| | | //组装对象数据 |
| | | Map<String, Object> data = new HashMap<String, Object>(); |
| | |
| | | private WaitPakinLogService waitPakinLogService; |
| | | @Autowired |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private ReportToThirdService reportToThirdService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start(WrkMast wrkMast) { |
| | |
| | | if (wrkMast.getIoType() == 1) { |
| | | // 入库通知单 |
| | | if (!Cools.isEmpty(wrkMast.getBarcode())) { |
| | | WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | if ("Y".equals(waitPakin.getTkFlag())) { |
| | | reportToThirdService.reportTkrk(waitPakin.getBatch(), waitPakin.getAnfme()); |
| | | } |
| | | |
| | | // 保存入库通知档历史档 |
| | | if (!waitPakinLogService.save(wrkMast.getBarcode())) { |
| | | // exceptionHandle("保存入库通知档历史档[workNo={0}]失败", wrkMast.getWrkNo()); |
| | |
| | | |
| | | private Double weight; |
| | | |
| | | //退库组托 |
| | | private String tkFlag; |
| | | |
| | | |
| | | public DetlDto() { |
| | |
| | | |
| | | private Integer staNo; |
| | | |
| | | private Double weight; |
| | | |
| | | |
| | | public LocDto() { |
| | | } |
| | | |
| New file |
| | |
| | | package com.zy.nc.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * |
| | | * @TableName ncc_xsckmx_tk_wms |
| | | */ |
| | | @TableName(value ="ncc_xsckmx_tk_wms") |
| | | @Data |
| | | public class NccXsckmxTkWms { |
| | | /** |
| | | * |
| | | */ |
| | | @TableId |
| | | private String cgeneralbid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String vbatchcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String csourcebilldate; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String vsourcebillcode; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String khbm; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String khmc; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String csourcebillhid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String csourcebillbid; |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private String wlbm; |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.nc.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.zy.nc.entity.NccXsckmxTkWms; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【ncc_xsckmx_tk_wms】的数据库操作Mapper |
| | | * @createDate 2025-06-04 16:01:00 |
| | | * @Entity com.zy.nc.entity.NccScPcdaWms |
| | | */ |
| | | public interface NccXsckmxTkWmsMapper extends BaseMapper<NccXsckmxTkWms> { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | package com.zy.nc.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.zy.nc.entity.NccXsckmxTkWms; |
| | | |
| | | /** |
| | | * @description 针对表【ncc_xsckmx_tk_wms】的数据库操作Service |
| | | */ |
| | | public interface NccXsckmxTkWmsService extends IService<NccXsckmxTkWms> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.zy.nc.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.nc.entity.NccScPcdaWms; |
| | | import com.zy.nc.entity.NccXsckmxTkWms; |
| | | import com.zy.nc.mapper.NccScPcdaWmsMapper; |
| | | import com.zy.nc.mapper.NccXsckmxTkWmsMapper; |
| | | import com.zy.nc.service.NccScPcdaWmsService; |
| | | import com.zy.nc.service.NccXsckmxTkWmsService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zc857 |
| | | * @description 针对表【ncc_xsckmx_tk_wms】的数据库操作Service实现 |
| | | * @createDate 2025-06-04 16:01:00 |
| | | */ |
| | | @Service |
| | | public class NccXsckmxTkWmsServiceImpl extends ServiceImpl<NccXsckmxTkWmsMapper, NccXsckmxTkWms> |
| | | implements NccXsckmxTkWmsService { |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <include refid="batchSeqNew"></include> |
| | | </update> |
| | | |
| | | <update id="updateWeight"> |
| | | update asr_loc_detl |
| | | set weight = #{weight} |
| | | , modi_time = getdate() |
| | | where 1=1 |
| | | and loc_no = #{locNo} |
| | | and matnr = #{matnr} |
| | | <include refid="batchSeqNew"></include> |
| | | </update> |
| | | |
| | | <sql id="stockOutCondition"> |
| | | <if test="loc_no!=null and loc_no!='' "> |
| | | and a.loc_no like '%' + #{loc_no} + '%' |
| | |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | <result column="tk_flag" property="tkFlag" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="box_type1" property="boxType1" /> |
| | | <result column="box_type2" property="boxType2" /> |
| | | <result column="box_type3" property="boxType3" /> |
| | | <result column="tk_flag" property="tkFlag" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.zy.nc.mapper.NccXsckmxTkWmsMapper"> |
| | | |
| | | <resultMap id="BaseResultMap" type="com.zy.nc.entity.NccXsckmxTkWms"> |
| | | <result property="cgeneralbid" column="CGENERALBID" /> |
| | | <result property="vbatchcode" column="VBATCHCODE" /> |
| | | <result property="csourcebilldate" column="CSOURCEBILLDATE" /> |
| | | <result property="vsourcebillcode" column="VSOURCEBILLCODE" /> |
| | | <result property="khbm" column="KHBM" /> |
| | | <result property="khmc" column="KHMC" /> |
| | | <result property="csourcebillhid" column="CSOURCEBILLHID" /> |
| | | <result property="csourcebillbid" column="CSOURCEBILLBID" /> |
| | | <result property="wlbm" column="WLBM" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | CODE,NAME,SHORTNAME,wms_flag |
| | | </sql> |
| | | </mapper> |
| | |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', width: 200} |
| | | ,{field: 'batch', align: 'center',title: '批次'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'weight$', align: 'center',title: '辅数量'} |
| | | ,{field: 'weight', align: 'center',title: '辅数量'} |
| | | // ,{field: 'anfme', align: 'center',title: '数量'} |
| | | // ,{field: 'qty', align: 'center',title: '作业数量', style: 'font-weight: bold'} |
| | | ,{field: 'enableQty', align: 'center',title: '待出数量', style: 'font-weight: bold'} |