| | |
| | | public synchronized R syncStockUpload(@RequestHeader(required = false) String appkey, |
| | | @RequestBody(required = false) List<MatSyncParam> param, |
| | | HttpServletRequest request){ |
| | | auth(appkey, param, request); |
| | | // auth(appkey, param, request); |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | |
| | | @TableName("asr_check_detl") |
| | | @ExcelIgnoreUnannotated |
| | | public class CheckDetl implements Serializable { |
| | | |
| | | @ApiModelProperty(value= "盘点单编号") |
| | | @ExcelProperty("盘点单编号") |
| | | private String orderNo; |
| | | |
| | | |
| | | @ApiModelProperty(value= "数量") |
| | | @ExcelProperty("数量") |
| | | private Double anfme; |
| | |
| | | @Data |
| | | public class MatSyncParam { |
| | | |
| | | // /** |
| | | // * 创建时间 |
| | | // */ |
| | | // public String createTime; |
| | | /** |
| | | * orderNo订单编号 |
| | | */ |
| | | public String orderNo; |
| | | |
| | | public List<MatParam> data; |
| | | |
| | |
| | | throw new CoolException("物料数据为空"); |
| | | } |
| | | |
| | | if (Cools.isEmpty(param.getOrderNo()) || param.getOrderNo().isEmpty()) { |
| | | throw new CoolException("盘点单编号为空"); |
| | | } |
| | | |
| | | for (MatSyncParam.MatParam matParam : param.getData()) { |
| | | if (Cools.isEmpty(matParam.getMatnr())) { |
| | | throw new CoolException("商品编码为空"); |
| | |
| | | |
| | | if (diff != 0) { |
| | | CheckDetl checkDetl = new CheckDetl(); |
| | | checkDetl.setOrderNo(param.getOrderNo()); |
| | | checkDetl.setAnfme(diff); //这里记录差值 |
| | | checkDetl.setMatnr(matParam.getMatnr()); |
| | | checkDetl.setMaktx(matParam.getMaktx()); |
| | | checkDetl.setSpecs(matParam.getSpecs()); |
| | | checkDetl.setBatch(matParam.getBatch()); |
| | | checkDetl.setCreateTime(new Date()); |
| | | |
| | | checkDetlService.insert(checkDetl); // 插入差异记录 |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <result column="specs" property="specs"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="order_no" property="orderNo"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | <result column="specs" property="specs" /> |
| | | <result column="batch" property="batch" /> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="order_no" property="orderNo"/> |
| | | </resultMap> |
| | | |
| | | <sql id="batchSeq"> |
| | |
| | | </if> |
| | | <if test="specs!=null and specs!='' "> |
| | | and a.specs like '%' + #{specs} + '%' |
| | | </if> |
| | | <if test="order_no!=null and order_no!='' "> |
| | | and a.order_no like '%' + #{order_no} + '%' |
| | | </if> |
| | | </sql> |
| | | |
| | |
| | | a.maktx, |
| | | a.specs, |
| | | a.batch, |
| | | a.create_time |
| | | a.create_time, |
| | | a.order_no |
| | | from asr_check_detl a |
| | | where 1=1 |
| | | <include refid="stockOutCondition" /> |
| | |
| | | // ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | // ,{field: 'typeId', align: 'center',title: '路径ID'} |
| | | // ,{field: 'typeDesc', align: 'center',title: '作业类型'} |
| | | {field: 'anfme', align: 'center',title: '库存数量(正少/负多)', style: 'font-weight: bold'}, |
| | | {field: 'orderNo', align: 'center',title: '盘点单编号', style: 'font-weight: bold'}, |
| | | {field: 'anfme', align: 'center',title: '盘点盈亏', style: 'font-weight: bold'}, |
| | | {field: 'createTime$', align: 'center',title: '创建时间', style: 'font-weight: bold'}, |
| | | {field: 'matnr', align: 'center',title: '商品编号', style: 'font-weight: bold'}, |
| | | |
| | |
| | | |
| | | // ,{field: 'appeUser$', align: 'center',title: '创建者',event: 'appeUser', style: 'cursor:pointer'} |
| | | // ,{field: 'appeTime$', align: 'center',title: '添加时间'} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | // console.log(res) |
| | | console.log(res) |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | |
| | | |
| | | <div class="layui-btn-container"> |
| | | <!-- <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> |
| | | <!-- <button class="layui-btn layui-btn-primary" id="btn-init" lay-event="init">初始化</button>--> |
| | | <button class="layui-btn layui-btn-sm" id="btn-init" lay-event="init">上报</button> |
| | | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> |
| | | </div> |