| | |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | private Long orderId; |
| | | |
| | | /** |
| | | * 单据编号 |
| | | */ |
| | | @ApiModelProperty(value= "单据编号") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 数量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double anfme; |
| | | |
| | | @ApiModelProperty(value= "已完成数量") |
| | | private Double qty; |
| | | |
| | | @ApiModelProperty(value= "作业数量") |
| | | private Double workQty; |
| | | |
| | | /** |
| | | * 商品编码 |
| | |
| | | private String maktx; |
| | | |
| | | /** |
| | | * 名称 |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value= "名称") |
| | | private String name; |
| | | @ApiModelProperty(value= "批号") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 规格 |
| | |
| | | private String model; |
| | | |
| | | /** |
| | | * 批号 |
| | | * 颜色 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | | private String batch; |
| | | @ApiModelProperty(value= "颜色") |
| | | private String color; |
| | | |
| | | /** |
| | | * 品牌 |
| | | */ |
| | | @ApiModelProperty(value= "品牌") |
| | | private String brand; |
| | | |
| | | /** |
| | | * 单位 |
| | |
| | | private String unit; |
| | | |
| | | /** |
| | | * 商品条码 |
| | | */ |
| | | @ApiModelProperty(value= "商品条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 供应商 |
| | | */ |
| | | @ApiModelProperty(value= "供应商") |
| | | private String supplier; |
| | | |
| | | /** |
| | | * 单价 |
| | | */ |
| | | @ApiModelProperty(value= "单价") |
| | | private Double unitPrice; |
| | | private Double price; |
| | | |
| | | /** |
| | | * sku |
| | | */ |
| | | @ApiModelProperty(value= "sku") |
| | | private String sku; |
| | | |
| | | /** |
| | | * 单位量 |
| | | */ |
| | | @ApiModelProperty(value= "单位量") |
| | | private Double units; |
| | | |
| | | /** |
| | | * 条码 |
| | | */ |
| | | @ApiModelProperty(value= "条码") |
| | | private String barcode; |
| | | |
| | | /** |
| | | * 产地 |
| | | */ |
| | | @ApiModelProperty(value= "产地") |
| | | private String origin; |
| | | |
| | | /** |
| | | * 厂家 |
| | | */ |
| | | @ApiModelProperty(value= "厂家") |
| | | private String manu; |
| | | |
| | | /** |
| | | * 生产日期 |
| | | */ |
| | | @ApiModelProperty(value= "生产日期") |
| | | private String manuDate; |
| | | |
| | | /** |
| | | * 品项数 |
| | | */ |
| | | @ApiModelProperty(value= "品项数") |
| | | private Integer itemNum; |
| | | private String itemNum; |
| | | |
| | | /** |
| | | * 数量 |
| | | * 安全库存量 |
| | | */ |
| | | @ApiModelProperty(value= "数量") |
| | | private Double count; |
| | | @ApiModelProperty(value= "安全库存量") |
| | | private Double safeQty; |
| | | |
| | | /** |
| | | * 重量 |
| | | */ |
| | | @ApiModelProperty(value= "重量") |
| | | private Double weight; |
| | | |
| | | /** |
| | | * 长度 |
| | | */ |
| | | @ApiModelProperty(value= "长度") |
| | | private Double length; |
| | | |
| | | /** |
| | | * 体积 |
| | | */ |
| | | @ApiModelProperty(value= "体积") |
| | | private Double volume; |
| | | |
| | | /** |
| | | * 仓库号 |
| | | */ |
| | | @ApiModelProperty(value= "仓库号") |
| | | private String threeCode; |
| | | |
| | | /** |
| | | * 来源单号 |
| | | */ |
| | | @ApiModelProperty(value= "来源单号") |
| | | private String supp; |
| | | |
| | | /** |
| | | * 来源序号 |
| | | */ |
| | | @ApiModelProperty(value= "来源序号") |
| | | private String suppCode; |
| | | |
| | | /** |
| | | * 是否批次 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "是否批次 1: 是 0: 否 ") |
| | | private Integer beBatch; |
| | | |
| | | /** |
| | | * 保质期 |
| | | */ |
| | | @ApiModelProperty(value= "保质期") |
| | | private String deadTime; |
| | | |
| | | /** |
| | | * 预警天数 |
| | | */ |
| | | @ApiModelProperty(value= "预警天数") |
| | | private Integer deadWarn; |
| | | |
| | | /** |
| | | * 制购 1: 制造 2: 采购 3: 外协 |
| | | */ |
| | | @ApiModelProperty(value= "制购 1: 制造 2: 采购 3: 外协 ") |
| | | private Integer source; |
| | | |
| | | /** |
| | | * 要求检验 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "要求检验 1: 是 0: 否 ") |
| | | private Integer inspect; |
| | | |
| | | /** |
| | | * 危险品 1: 是 0: 否 |
| | | */ |
| | | @ApiModelProperty(value= "危险品 1: 是 0: 否 ") |
| | | private Integer danger; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | |
| | | |
| | | public OrderDetlLog() {} |
| | | |
| | | public OrderDetlLog(Long id,Long orderId,Double anfme,String matnr,String maktx,String name,String specs,String model,String batch,String unit,String barcode,String supplier,Double unitPrice,Integer itemNum,Double count,Double weight,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Long hostId) { |
| | | this.id = id; |
| | | this.orderId = orderId; |
| | | this.anfme = anfme; |
| | | this.matnr = matnr; |
| | | this.maktx = maktx; |
| | | this.name = name; |
| | | this.specs = specs; |
| | | this.model = model; |
| | | this.batch = batch; |
| | | this.unit = unit; |
| | | this.barcode = barcode; |
| | | this.supplier = supplier; |
| | | this.unitPrice = unitPrice; |
| | | this.itemNum = itemNum; |
| | | this.count = count; |
| | | this.weight = weight; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | this.hostId = hostId; |
| | | } |
| | | // public OrderDetlLog(Long id,Long orderId,Double anfme,String matnr,String maktx,String name,String specs,String model,String batch,String unit,String barcode,String supplier,Double unitPrice,Integer itemNum,Double count,Double weight,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo,Long hostId) { |
| | | // this.id = id; |
| | | // this.orderId = orderId; |
| | | // this.anfme = anfme; |
| | | // this.matnr = matnr; |
| | | // this.maktx = maktx; |
| | | // this.name = name; |
| | | // this.specs = specs; |
| | | // this.model = model; |
| | | // this.batch = batch; |
| | | // this.unit = unit; |
| | | // this.barcode = barcode; |
| | | // this.supplier = supplier; |
| | | // this.unitPrice = unitPrice; |
| | | // this.itemNum = itemNum; |
| | | // this.count = count; |
| | | // this.weight = weight; |
| | | // this.status = status; |
| | | // this.createBy = createBy; |
| | | // this.createTime = createTime; |
| | | // this.updateBy = updateBy; |
| | | // this.updateTime = updateTime; |
| | | // this.memo = memo; |
| | | // this.hostId = hostId; |
| | | // } |
| | | |
| | | // OrderDetlLog orderDetlLog = new OrderDetlLog( |
| | | // null, // ID[非空] |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.zy.asrs.common.wms.service.CstmrService; |
| | | import com.zy.asrs.common.wms.service.DocTypeService; |
| | | import com.zy.asrs.common.wms.service.ItemService; |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @TableField("order_no") |
| | | @ApiModelProperty(value= "订单编号") |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 单据日期 |
| | | */ |
| | | @TableField("order_time") |
| | | @ApiModelProperty(value= "单据日期") |
| | | private String orderTime; |
| | | |
| | | /** |
| | | * 单据类型 |
| | | */ |
| | | @TableField("doc_type") |
| | | @ApiModelProperty(value= "单据类型") |
| | | private Long docType; |
| | | |
| | | /** |
| | | * 项目编号 |
| | | */ |
| | | @TableField("item_id") |
| | | @ApiModelProperty(value= "项目编号") |
| | | private Long itemId; |
| | | |
| | | @ApiModelProperty(value= "") |
| | | @TableField("item_name") |
| | | private String itemName; |
| | | |
| | | /** |
| | | * 调拨项目编号 |
| | | */ |
| | | @ApiModelProperty(value= "调拨项目编号") |
| | | @TableField("allot_item_id") |
| | | private Long allotItemId; |
| | | |
| | | /** |
| | | * 初始票据号 |
| | | */ |
| | | @ApiModelProperty(value= "初始票据号") |
| | | @TableField("def_number") |
| | | private String defNumber; |
| | | |
| | | /** |
| | |
| | | * 客户 |
| | | */ |
| | | @ApiModelProperty(value= "客户") |
| | | @TableField("cstmr_name") |
| | | private String cstmrName; |
| | | |
| | | /** |
| | |
| | | * 操作人员 |
| | | */ |
| | | @ApiModelProperty(value= "操作人员") |
| | | @TableField("oper_memb") |
| | | private String operMemb; |
| | | |
| | | /** |
| | | * 合计金额 |
| | | */ |
| | | @ApiModelProperty(value= "合计金额") |
| | | @TableField("total_fee") |
| | | private Double totalFee; |
| | | |
| | | /** |
| | |
| | | * 优惠金额 |
| | | */ |
| | | @ApiModelProperty(value= "优惠金额") |
| | | @TableField("discount_fee") |
| | | private Double discountFee; |
| | | |
| | | /** |
| | | * 销售或采购费用合计 |
| | | */ |
| | | @ApiModelProperty(value= "销售或采购费用合计") |
| | | @TableField("other_fee") |
| | | private Double otherFee; |
| | | |
| | | /** |
| | | * 实付金额 |
| | | */ |
| | | @ApiModelProperty(value= "实付金额") |
| | | @TableField("act_fee") |
| | | private Double actFee; |
| | | |
| | | /** |
| | | * 付款类型 1: 现金 2: 记账 |
| | | * 付款类型 1: 现金 2: 记账 |
| | | */ |
| | | @ApiModelProperty(value= "付款类型 1: 现金 2: 记账 ") |
| | | @TableField("pay_type") |
| | | private Integer payType; |
| | | |
| | | /** |
| | |
| | | * 结算天数 |
| | | */ |
| | | @ApiModelProperty(value= "结算天数") |
| | | @TableField("account_day") |
| | | private Integer accountDay; |
| | | |
| | | /** |
| | | * 邮费支付类型 1: 在线支付 2: 货到付款 |
| | | * 邮费支付类型 1: 在线支付 2: 货到付款 |
| | | */ |
| | | @ApiModelProperty(value= "邮费支付类型 1: 在线支付 2: 货到付款 ") |
| | | @TableField("post_fee_type") |
| | | private Integer postFeeType; |
| | | |
| | | /** |
| | | * 邮费 |
| | | */ |
| | | @ApiModelProperty(value= "邮费") |
| | | @TableField("post_fee") |
| | | private Double postFee; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "付款时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @TableField("pay_time") |
| | | private Date payTime; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "发货时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @TableField("send_time") |
| | | private Date sendTime; |
| | | |
| | | /** |
| | | * 物流名称 |
| | | */ |
| | | @ApiModelProperty(value= "物流名称") |
| | | @TableField("ship_name") |
| | | private String shipName; |
| | | |
| | | /** |
| | | * 物流单号 |
| | | */ |
| | | @ApiModelProperty(value= "物流单号") |
| | | @TableField("ship_code") |
| | | private String shipCode; |
| | | |
| | | /** |
| | |
| | | private Long settle; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | |
| | | * 授权商户 |
| | | */ |
| | | @ApiModelProperty(value= "授权商户") |
| | | @TableField("host_id") |
| | | private Long hostId; |
| | | |
| | | public OrderLog() {} |
| | |
| | | |
| | | int increaseWorkQty(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch, @Param("workQty") Double workQty, @Param("hostId") Long hostId); |
| | | |
| | | int addToLogTable(OrderDetl orderDetl); |
| | | } |
| | |
| | | List<Order> selectComplete(); |
| | | |
| | | int updateSettle(@Param("orderId") Long orderId, @Param("settle") Long settle, @Param("userId") Long userId, @Param("hostId") Long hostId); |
| | | |
| | | int addToLogTable(Order order); |
| | | } |
| | |
| | | |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty, Long hostId); |
| | | |
| | | boolean addToLogTable(OrderDetl orderDetl); |
| | | } |
| | |
| | | List<String> selectAllOutOrderNo(String orderNo,Long hostId); |
| | | |
| | | List<Order> selectComplete(); |
| | | boolean addToLogTable(Order order); |
| | | |
| | | } |
| | |
| | | public boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty, Long hostId) { |
| | | return this.baseMapper.increaseWorkQty(orderId, matnr, batch, workQty, hostId) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean addToLogTable(OrderDetl orderDetl) { |
| | | return this.baseMapper.addToLogTable(orderDetl) > 0; |
| | | } |
| | | } |
| | |
| | | return orderNameListDtos; |
| | | |
| | | } |
| | | @Override |
| | | public boolean addToLogTable(Order order) { |
| | | return this.baseMapper.addToLogTable(order) > 0; |
| | | } |
| | | } |
| | |
| | | </choose> |
| | | </update> |
| | | |
| | | <insert id="addToLogTable"> |
| | | INSERT INTO man_order_detl_log SELECT * FROM man_order_detl WHERE id = #{id} |
| | | </insert> |
| | | </mapper> |
| | |
| | | <?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.asrs.common.wms.mapper.OrderLogMapper"> |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.common.wms.entity.Order"> |
| | | <id column="id" property="id" /> |
| | | <result column="uuid" property="uuid" /> |
| | | <result column="order_no" property="orderNo" /> |
| | | <result column="order_time" property="orderTime" /> |
| | | <result column="doc_type" property="docType" /> |
| | | <result column="item_id" property="itemId" /> |
| | | <result column="item_name" property="itemName" /> |
| | | <result column="allot_item_id" property="allotItemId" /> |
| | | <result column="def_number" property="defNumber" /> |
| | | <result column="number" property="number" /> |
| | | <result column="cstmr" property="cstmr" /> |
| | | <result column="cstmr_name" property="cstmrName" /> |
| | | <result column="tel" property="tel" /> |
| | | <result column="oper_memb" property="operMemb" /> |
| | | <result column="total_fee" property="totalFee" /> |
| | | <result column="discount" property="discount" /> |
| | | <result column="discount_fee" property="discountFee" /> |
| | | <result column="other_fee" property="otherFee" /> |
| | | <result column="act_fee" property="actFee" /> |
| | | <result column="pay_type" property="payType" /> |
| | | <result column="salesman" property="salesman" /> |
| | | <result column="account_day" property="accountDay" /> |
| | | <result column="post_fee_type" property="postFeeType" /> |
| | | <result column="post_fee" property="postFee" /> |
| | | <result column="pay_time" property="payTime" /> |
| | | <result column="send_time" property="sendTime" /> |
| | | <result column="ship_name" property="shipName" /> |
| | | <result column="ship_code" property="shipCode" /> |
| | | <result column="settle" property="settle" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="memo" property="memo" /> |
| | | <result column="host_id" property="hostId" /> |
| | | |
| | | </resultMap> |
| | | </mapper> |
| | |
| | | and status = 1 |
| | | order by create_time asc |
| | | </select> |
| | | <insert id="addToLogTable"> |
| | | INSERT INTO man_order_log SELECT * FROM man_order WHERE id = #{id} |
| | | </insert> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | List<LocDetl> locDetls=new ArrayList<>(); |
| | | for (LocDetl l:list |
| | | ) { |
| | | String new_String = l.getMatnr().replace("\"",""); |
| | | l.setMatnr(new_String); |
| | | if(Cools.isEmpty(l.getMaktx())){ |
| | | continue; |
| | | } |
| | | String new_String = l.getMaktx().replace("\"",""); |
| | | l.setMaktx(new_String); |
| | | locDetls.add(l); |
| | | } |
| | | return R.ok(exportSupport(locDetls, fields)); |
| | |
| | | } |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setBatch(""); |
| | | orderDetl.setAnfme(0.0D); |
| | | return R.ok().add(orderDetl); |
| | | } |
| | |
| | | |
| | | ArrayList<Long> orderIds = new ArrayList<>(); |
| | | for (Order order : orders) { |
| | | orderIds.add(order.getId()); |
| | | Date currentDate = new Date(); |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(currentDate); |
| | | calendar.add(Calendar.MONTH, -1); |
| | | |
| | | Date previousMonthDate = calendar.getTime(); |
| | | int result=previousMonthDate.compareTo(order.getCreateTime()); |
| | | if(result<0){ |
| | | orderIds.add(order.getId()); |
| | | } |
| | | |
| | | } |
| | | |
| | | //搜索明细 |
| | |
| | | wrapper1.eq(OrderDetl::getHostId, getHostId()); |
| | | wrapper1.in(OrderDetl::getOrderId, orderIds); |
| | | wrapper1.orderByDesc(OrderDetl::getCreateTime); |
| | | // wrapper1.last("LIMIT 1000"); |
| | | if (!Cools.isEmpty(matnr)) { |
| | | wrapper1.like(OrderDetl::getMatnr, matnr); |
| | | } |
| | |
| | | if (issued >0){ |
| | | List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), hostId); |
| | | for (LocDetl locDetl : locDetls) { |
| | | for (HashMap.Entry<String,Integer> entry:hm.entrySet()){ |
| | | //过滤掉在已被标记的库位号 |
| | | boolean boo=false; |
| | | for (HashMap.Entry<String,Integer> entry:hm.entrySet()) { |
| | | if(locDetl.getLocNo().equals(entry.getKey())){ |
| | | continue; |
| | | boo=true; |
| | | break; |
| | | } |
| | | } |
| | | if (boo){ |
| | | continue; |
| | | } |
| | | List<LocDetl> locMats = locDetlService.list(new LambdaQueryWrapper<LocDetl>() |
| | | .eq(LocDetl::getLocNo, locDetl.getLocNo()) |
| | | .eq(LocDetl::getHostId, hostId)); |
| | |
| | | if (Cools.isEmpty(mat)){ |
| | | return R.error("品号:"+locInPrintMat.getMatnr()+"不存在,请先新增商品档案!!!").add("品号:"+locInPrintMat.getMatnr()+"不存在,请先新增商品档案!!!"); |
| | | } |
| | | // 打印数据注入 |
| | | MatPrint print = new MatPrint(); |
| | | print.setMatnr(mat.getMatnr()); |
| | | print.setBarcode(mat.getBarcode()); |
| | | print.setMaktx(mat.getMaktx()); |
| | | print.setSpecs(mat.getSpecs()); |
| | | print.setUnit(mat.getUnit()); |
| | | print.setMemo(mat.getMemo()); |
| | | int count=1; |
| | | if(!Cools.isEmpty(locInPrintMat.getAnfme())){ |
| | | count=locInPrintMat.getAnfme().intValue(); |
| | | } |
| | | for(int i=1;i<=count;i++){ |
| | | // 打印数据注入 |
| | | MatPrint print = new MatPrint(); |
| | | print.setMatnr(mat.getMatnr()); |
| | | print.setBarcode(mat.getBarcode()); |
| | | print.setMaktx(mat.getMaktx()); |
| | | print.setSpecs(mat.getSpecs()); |
| | | print.setUnit(mat.getUnit()); |
| | | print.setMemo(mat.getMemo()); |
| | | |
| | | print.setMaterial(mat.getMaterial()); |
| | | print.setDecrees(locInPrintMat.getDecrees()); |
| | | print.setImgNum(mat.getImgNum()); |
| | | print.setWeight(String.valueOf(mat.getWeight())); |
| | | print.setModel(mat.getModel()); |
| | | print.setLength(String.valueOf(mat.getLength())); |
| | | print.setWidth(mat.getWidth()); |
| | | print.setHeight(mat.getHeight()); |
| | | print.setMaterial(mat.getMaterial()); |
| | | print.setDecrees(locInPrintMat.getDecrees()); |
| | | print.setImgNum(mat.getImgNum()); |
| | | print.setWeight(String.valueOf(mat.getWeight())); |
| | | print.setModel(mat.getModel()); |
| | | print.setLength(String.valueOf(mat.getLength())); |
| | | print.setWidth(mat.getWidth()); |
| | | print.setHeight(mat.getHeight()); |
| | | // // 打印数据注入 |
| | | // MatPrint print = new MatPrint(); |
| | | // print.setMatnr(locInPrintMat.getMatnr()); |
| | |
| | | // print.setLocNo(locInPrintMat.getLocNo()); |
| | | // print.setOwnerId(locInPrintMat.getOwnerId()); |
| | | // print.setOwner(locInPrintMat.getOwner$()); |
| | | print.setId(locInPrintMat.getId()); |
| | | res.add(print); |
| | | print.setId(locInPrintMat.getId()); |
| | | res.add(print); |
| | | } |
| | | |
| | | locInPrintMat.setUpdateTime(new Date()); |
| | | locInPrintMat.setUpdateBy(getUserId()); |
| | | locInPrintMat.setStatus(2); |
| New file |
| | |
| | | package com.zy.asrs.wms.task; |
| | | |
| | | import com.zy.asrs.wms.task.handler.OrderMoveHistoryHandler; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public class OrderMoveHistoryScheduler { |
| | | @Autowired |
| | | private OrderMoveHistoryHandler orderMoveHistoryHandler; |
| | | |
| | | /** |
| | | * 将已完成order和orderDetl移动到log表 |
| | | */ |
| | | // @Scheduled(cron = "0 * * * * ?") |
| | | public void execute(){ |
| | | orderMoveHistoryHandler.start(); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.wms.task.handler; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.sun.org.apache.xpath.internal.operations.Or; |
| | | import com.zy.asrs.common.wms.entity.Order; |
| | | import com.zy.asrs.common.wms.entity.OrderDetl; |
| | | import com.zy.asrs.common.wms.service.OrderDetlService; |
| | | import com.zy.asrs.common.wms.service.OrderService; |
| | | import com.zy.asrs.framework.common.Cools; |
| | | import com.zy.asrs.wms.task.AbstractHandler; |
| | | import com.zy.asrs.wms.task.core.ReturnT; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @Slf4j |
| | | public class OrderMoveHistoryHandler extends AbstractHandler<String> { |
| | | @Autowired |
| | | private OrderService orderService; |
| | | @Autowired |
| | | private OrderDetlService orderDetlService; |
| | | |
| | | public ReturnT<String> start(){ |
| | | List<Order> settleEqual6 = orderService.list(new LambdaQueryWrapper<Order>() |
| | | .in(Order::getSettle, 6,7)); |
| | | for (Order order : settleEqual6) { |
| | | List<OrderDetl> orderDetls = orderDetlService.list(new LambdaQueryWrapper<OrderDetl>() |
| | | .eq(OrderDetl::getOrderNo, order.getOrderNo())); |
| | | moveBoth(order,orderDetls); |
| | | log.info("已完成单据移动至历史表成功 =====>" +order); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | private void moveBoth(Order order, List<OrderDetl> orderDetls){ |
| | | Date now = new Date(); |
| | | if (!Cools.isEmpty(orderDetls)) { |
| | | for (OrderDetl orderDetl : orderDetls) { |
| | | orderDetl.setUpdateBy(0L); |
| | | orderDetl.setUpdateTime(now); |
| | | orderDetlService.addToLogTable(orderDetl); |
| | | orderDetlService.remove(new LambdaQueryWrapper<OrderDetl>() |
| | | .eq(OrderDetl::getId,orderDetl.getId())); |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(order)){ |
| | | order.setUpdateBy(0L); |
| | | order.setUpdateTime(now); |
| | | orderService.addToLogTable(order); |
| | | orderService.remove(new LambdaQueryWrapper<Order>() |
| | | .eq(Order::getId,order.getId())); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | // ,{field: 'anfme', align: 'center',title: '重量(kg)', width:100,hide: false} |
| | | // ,{field: 'locNo', align: 'center',title: '库位号', width:120,hide: false} |
| | | ,{field: 'maktx', align: 'center',title: '品名',hide: false} |
| | | ,{field: 'anfme', align: 'center',title: '數量',hide: false} |
| | | // ,{field: 'owner$', align: 'center',title: '货主',hide: false} |
| | | // ,{field: 'createTime$', align: 'center',title: '入库时间', width:120,hide: false} |
| | | // ,{field: 'createBy$', align: 'center',title: '入库人员', width:100,hide: false} |
| | |
| | | url: baseUrl+'/mat/page/auth', |
| | | page: true, |
| | | limit: 16, |
| | | limits: [16, 30, 50, 100, 200, 500,1000,2000], |
| | | limits: [16, 30, 50, 100, 200, 500,1000,2000,10000,100000], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-105', |
| | |
| | | ,{field: 'matnr', align: 'center',title: '品号', width: 160} |
| | | ,{field: 'maktx', align: 'center',title: '名称', width: 200} |
| | | ,{field: 'batch', align: 'center',title: '序列码'} |
| | | ,{field: 'origin', align: 'center',title: '仓库号'} |
| | | // ,{field: 'origin', 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'} |
| | |
| | | headers: {token: localStorage.getItem('token')}, |
| | | data: [], |
| | | even: true, |
| | | limit: 1000, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | cols: [getCol()], |
| | |
| | | </div> |
| | | <script type="text/html" id="toolbar"> |
| | | <div class="layui-btn-container"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="margin-top: 10px">导出</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style=" |
| | | margin-top: 10px">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备注: </label> |
| | | <label class="layui-form-label">數量: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="memo" placeholder="请输入备注"> |
| | | <input class="layui-input" name="anfme" placeholder="请输入數量"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/pakStore/locCheckOut.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/pakStore/locCheckOut.js?v=2" charset="utf-8"></script> |
| | | <div id="resetLocDiv" style="margin: 20px 0 10px 30px; display: none"> |
| | | <div class="layui-form layui-form-pane"> |
| | | <!-- 排 --> |
| | |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/stock/out/list/auth', |
| | | page: true, |
| | | limit: 20, |
| | | limits: [20, 50, 100, 200, 500], |
| | | limit: 100, |
| | | limits: [100, 200, 500], |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/stock/out/list/auth', |
| | | page: true, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | limit: 16, |
| | | limits: [100, 200, 500], |
| | | limit: 100, |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/stock/out/list/auth/v2', |
| | | page: true, |
| | | limits: [16, 30, 50, 100, 200, 500], |
| | | limit: 16, |
| | | limits: [100, 200, 500], |
| | | limit: 100, |
| | | even: true, |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |