Merge remote-tracking branch 'origin/bfasrs' into bfasrs
24个文件已修改
11个文件已添加
1个文件已删除
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.CheckRecord; |
| | | import com.zy.asrs.service.CheckRecordService; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.CheckRecord; |
| | | import com.zy.asrs.service.CheckRecordService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | public class CheckRecordController extends BaseController { |
| | |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(CheckRecord.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} else { |
| | | wrapper.orderBy("create_time", false); |
| | | } |
| | | return R.ok(checkRecordService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/checkRecord/auditing/auth") |
| | | @ManagerAuth |
| | | public R auditing(Long id){ |
| | | CheckRecord checkRecord = checkRecordService.selectById(id); |
| | | if (Cools.isEmpty(checkRecord)) { |
| | | return R.error(); |
| | | } |
| | | checkRecord.setStatus(1); |
| | | if (!checkRecordService.updateById(checkRecord)) { |
| | | return R.error(); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/checkRecord/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.annotations.ManagerAuth; |
| | | import com.core.common.BaseRes; |
| | | import com.core.common.Cools; |
| | | import com.core.common.DateUtils; |
| | | import com.core.common.R; |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.zy.asrs.service.LocRuleService; |
| | | import com.zy.common.web.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | public class LocRuleController extends BaseController { |
| | | |
| | | @Autowired |
| | | private LocRuleService locRuleService; |
| | | |
| | | @RequestMapping(value = "/locRule/{id}/auth") |
| | | @ManagerAuth |
| | | public R get(@PathVariable("id") String id) { |
| | | return R.ok(locRuleService.selectById(String.valueOf(id))); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locRule/list/auth") |
| | | @ManagerAuth |
| | | public R list(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "10")Integer limit, |
| | | @RequestParam(required = false)String orderByField, |
| | | @RequestParam(required = false)String orderByType, |
| | | @RequestParam(required = false)String condition, |
| | | @RequestParam Map<String, Object> param){ |
| | | EntityWrapper<LocRule> wrapper = new EntityWrapper<>(); |
| | | excludeTrash(param); |
| | | convert(param, wrapper); |
| | | allLike(LocRule.class, param.keySet(), wrapper, condition); |
| | | if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} |
| | | return R.ok(locRuleService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | | if (val.contains(RANGE_TIME_LINK)){ |
| | | String[] dates = val.split(RANGE_TIME_LINK); |
| | | wrapper.ge(entry.getKey(), DateUtils.convert(dates[0])); |
| | | wrapper.le(entry.getKey(), DateUtils.convert(dates[1])); |
| | | } else { |
| | | wrapper.like(entry.getKey(), val); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @RequestMapping(value = "/locRule/add/auth") |
| | | @ManagerAuth |
| | | public R add(LocRule locRule) { |
| | | if ((locRule.getRowBeg() < locRule.getRowEnd()) || locRule.getRowBeg() <= 0 || locRule.getRowEnd() <= 0) { |
| | | return R.error("排区间错误"); |
| | | } |
| | | if ((locRule.getBayBeg() < locRule.getBayEnd()) || locRule.getBayBeg() <= 0 || locRule.getBayEnd() <= 0) { |
| | | return R.error("列区间错误"); |
| | | } |
| | | if ((locRule.getLevBeg() < locRule.getLevEnd()) || locRule.getLevBeg() <= 0 || locRule.getLevEnd() <= 0) { |
| | | return R.error("层区间错误"); |
| | | } |
| | | Date now = new Date(); |
| | | locRule.setStatus(1); |
| | | locRule.setCreateBy(getUserId()); |
| | | locRule.setCreateTime(now); |
| | | locRule.setUpdateBy(getUserId()); |
| | | locRule.setUpdateTime(now); |
| | | locRuleService.insert(locRule); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locRule/update/auth") |
| | | @ManagerAuth |
| | | public R update(LocRule locRule){ |
| | | if (Cools.isEmpty(locRule) || null==locRule.getId()){ |
| | | return R.error(); |
| | | } |
| | | if ((locRule.getRowBeg() < locRule.getRowEnd()) || locRule.getRowBeg() <= 0 || locRule.getRowEnd() <= 0) { |
| | | return R.error("排区间错误"); |
| | | } |
| | | if ((locRule.getBayBeg() < locRule.getBayEnd()) || locRule.getBayBeg() <= 0 || locRule.getBayEnd() <= 0) { |
| | | return R.error("列区间错误"); |
| | | } |
| | | if ((locRule.getLevBeg() < locRule.getLevEnd()) || locRule.getLevBeg() <= 0 || locRule.getLevEnd() <= 0) { |
| | | return R.error("层区间错误"); |
| | | } |
| | | locRule.setUpdateBy(getUserId()); |
| | | locRule.setUpdateTime(new Date()); |
| | | locRuleService.updateById(locRule); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locRule/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | locRuleService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locRule/export/auth") |
| | | @ManagerAuth |
| | | public R export(@RequestBody JSONObject param){ |
| | | EntityWrapper<LocRule> wrapper = new EntityWrapper<>(); |
| | | List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class); |
| | | Map<String, Object> map = excludeTrash(param.getJSONObject("locRule")); |
| | | convert(map, wrapper); |
| | | List<LocRule> list = locRuleService.selectList(wrapper); |
| | | return R.ok(exportSupport(list, fields)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locRuleQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |
| | | EntityWrapper<LocRule> wrapper = new EntityWrapper<>(); |
| | | wrapper.like("id", condition); |
| | | Page<LocRule> page = locRuleService.selectPage(new Page<>(0, 10), wrapper); |
| | | List<Map<String, Object>> result = new ArrayList<>(); |
| | | for (LocRule locRule : page.getRecords()){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("id", locRule.getId()); |
| | | map.put("value", locRule.getId()); |
| | | result.add(map); |
| | | } |
| | | return R.ok(result); |
| | | } |
| | | |
| | | @RequestMapping(value = "/locRule/check/column/auth") |
| | | @ManagerAuth |
| | | public R query(@RequestBody JSONObject param) { |
| | | Wrapper<LocRule> wrapper = new EntityWrapper<LocRule>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val")); |
| | | if (null != locRuleService.selectOne(wrapper)){ |
| | | return R.parse(BaseRes.REPEAT).add(getComment(LocRule.class, String.valueOf(param.get("key")))); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | ViewStayTimeBean bean = new ViewStayTimeBean(); |
| | | bean.setPageSize(limit); |
| | | bean.setPageNumber(curr); |
| | | String matnr = String.valueOf(param.get("matnr")); |
| | | if (!Cools.isEmpty(matnr) && !matnr.equals("null")) { |
| | | bean.setMatnr(matnr); |
| | | } |
| | | |
| | | String maktx = String.valueOf(param.get("maktx")); |
| | | if (!Cools.isEmpty(maktx) && !maktx.equals("null")) { |
| | | bean.setMaktx(maktx); |
| | | } |
| | | |
| | | String specs = String.valueOf(param.get("specs")); |
| | | if (!Cools.isEmpty(specs) && !specs.equals("null")) { |
| | | bean.setSpecs(specs); |
| | | } |
| | | |
| | | String locNo = String.valueOf(param.get("loc_no")); |
| | | if (!Cools.isEmpty(locNo) && !locNo.equals("null")) { |
| | | bean.setLoc_no(locNo); |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.core.common.Cools; |
| | | import com.zy.common.utils.Synchro; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @TableName("asr_check_record") |
| | | public class CheckRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 库位号 |
| | |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 状态 1: 已审核 0: 未审核 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 已审核 0: 未审核 ") |
| | | private Integer status; |
| | | |
| | | public CheckRecord() {} |
| | | |
| | | public CheckRecord(String locNo,String barcode,String matnr,String maktx,String specs,String batch,Double anfme,Double confirmQty,Date createTime) { |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "已审核"; |
| | | case 0: |
| | | return "未审核"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity; |
| | | |
| | | import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.system.service.UserService; |
| | | import com.zy.system.entity.User; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | @Data |
| | | @TableName("asr_loc_rule") |
| | | public class LocRule implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value= "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | * 商品编号 |
| | | */ |
| | | @ApiModelProperty(value= "商品编号") |
| | | private String matnr; |
| | | |
| | | /** |
| | | * 规格 |
| | | */ |
| | | @ApiModelProperty(value= "规格") |
| | | private String specs; |
| | | |
| | | /** |
| | | * 型号 |
| | | */ |
| | | @ApiModelProperty(value= "型号") |
| | | private String model; |
| | | |
| | | /** |
| | | * 客户 |
| | | */ |
| | | @ApiModelProperty(value= "客户") |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 批号 |
| | | */ |
| | | @ApiModelProperty(value= "批号") |
| | | private String batch; |
| | | |
| | | /** |
| | | * 其他 |
| | | */ |
| | | @ApiModelProperty(value= "其他") |
| | | private String other; |
| | | |
| | | /** |
| | | * 开始排 |
| | | */ |
| | | @ApiModelProperty(value= "开始排") |
| | | @TableField("row_beg") |
| | | private Integer rowBeg; |
| | | |
| | | /** |
| | | * 结束排 |
| | | */ |
| | | @ApiModelProperty(value= "结束排") |
| | | @TableField("row_end") |
| | | private Integer rowEnd; |
| | | |
| | | /** |
| | | * 开始列 |
| | | */ |
| | | @ApiModelProperty(value= "开始列") |
| | | @TableField("bay_beg") |
| | | private Integer bayBeg; |
| | | |
| | | /** |
| | | * 结束列 |
| | | */ |
| | | @ApiModelProperty(value= "结束列") |
| | | @TableField("bay_end") |
| | | private Integer bayEnd; |
| | | |
| | | /** |
| | | * 开始层 |
| | | */ |
| | | @ApiModelProperty(value= "开始层") |
| | | @TableField("lev_beg") |
| | | private Integer levBeg; |
| | | |
| | | /** |
| | | * 结束层 |
| | | */ |
| | | @ApiModelProperty(value= "结束层") |
| | | @TableField("lev_end") |
| | | private Integer levEnd; |
| | | |
| | | /** |
| | | * 上限 |
| | | */ |
| | | @ApiModelProperty(value= "上限") |
| | | private Integer limit; |
| | | |
| | | /** |
| | | * 状态 1: 正常 0: 禁用 |
| | | */ |
| | | @ApiModelProperty(value= "状态 1: 正常 0: 禁用 ") |
| | | private Integer status; |
| | | |
| | | /** |
| | | * 添加人员 |
| | | */ |
| | | @ApiModelProperty(value= "添加人员") |
| | | @TableField("create_by") |
| | | private Long createBy; |
| | | |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @ApiModelProperty(value= "添加时间") |
| | | @TableField("create_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 修改人员 |
| | | */ |
| | | @ApiModelProperty(value= "修改人员") |
| | | @TableField("update_by") |
| | | private Long updateBy; |
| | | |
| | | /** |
| | | * 修改时间 |
| | | */ |
| | | @ApiModelProperty(value= "修改时间") |
| | | @TableField("update_time") |
| | | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty(value= "备注") |
| | | private String memo; |
| | | |
| | | public LocRule() {} |
| | | |
| | | public LocRule(String matnr,String specs,String model,String cstmr,String batch,String other,Integer rowBeg,Integer rowEnd,Integer bayBeg,Integer bayEnd,Integer levBeg,Integer levEnd,Integer limit,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { |
| | | this.matnr = matnr; |
| | | this.specs = specs; |
| | | this.model = model; |
| | | this.cstmr = cstmr; |
| | | this.batch = batch; |
| | | this.other = other; |
| | | this.rowBeg = rowBeg; |
| | | this.rowEnd = rowEnd; |
| | | this.bayBeg = bayBeg; |
| | | this.bayEnd = bayEnd; |
| | | this.levBeg = levBeg; |
| | | this.levEnd = levEnd; |
| | | this.limit = limit; |
| | | this.status = status; |
| | | this.createBy = createBy; |
| | | this.createTime = createTime; |
| | | this.updateBy = updateBy; |
| | | this.updateTime = updateTime; |
| | | this.memo = memo; |
| | | } |
| | | |
| | | // LocRule locRule = new LocRule( |
| | | // null, // 商品编号 |
| | | // null, // 规格 |
| | | // null, // 型号 |
| | | // null, // 客户 |
| | | // null, // 批号 |
| | | // null, // 其他 |
| | | // null, // 开始排 |
| | | // null, // 结束排 |
| | | // null, // 开始列 |
| | | // null, // 结束列 |
| | | // null, // 开始层 |
| | | // null, // 结束层 |
| | | // null, // 上限 |
| | | // null, // 状态 |
| | | // null, // 添加人员 |
| | | // null, // 添加时间 |
| | | // null, // 修改人员 |
| | | // null, // 修改时间 |
| | | // null // 备注 |
| | | // ); |
| | | |
| | | public String getStatus$(){ |
| | | if (null == this.status){ return null; } |
| | | switch (this.status){ |
| | | case 1: |
| | | return "正常"; |
| | | case 0: |
| | | return "禁用"; |
| | | default: |
| | | return String.valueOf(this.status); |
| | | } |
| | | } |
| | | |
| | | public String getCreateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.createBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getCreateTime$(){ |
| | | if (Cools.isEmpty(this.createTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); |
| | | } |
| | | |
| | | public String getUpdateBy$(){ |
| | | UserService service = SpringUtils.getBean(UserService.class); |
| | | User user = service.selectById(this.updateBy); |
| | | if (!Cools.isEmpty(user)){ |
| | | return String.valueOf(user.getNickname()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public String getUpdateTime$(){ |
| | | if (Cools.isEmpty(this.updateTime)){ |
| | | return ""; |
| | | } |
| | | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); |
| | | } |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.entity.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class MatnrCountDto { |
| | | |
| | | private String matnr; |
| | | |
| | | private Integer count; |
| | | |
| | | } |
| | |
| | | // 备注 |
| | | private String memo; |
| | | |
| | | private String cstmr; |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | List<LocMast> queryFreeLocMast(@Param("rows") List<Integer> rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1); |
| | | List<LocMast> queryFreeLocMast0(@Param("rows") List<Integer> rows, @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1, @Param("inoutEveryday") Boolean inoutEveryday); |
| | | List<LocMast> queryFreeLocMast1(@Param("rows") List<Integer> rows |
| | | , @Param("rowsLen") Integer rowsLen, @Param("locType1") Short locType1, @Param("inoutEveryday") Boolean inoutEveryday |
| | | , @Param("rowBeg") Integer rowBeg, @Param("rowEnd") Integer rowEnd, @Param("bayBeg") Integer bayBeg |
| | | , @Param("bayEnd") Integer bayEnd, @Param("levBeg") Integer levBeg, @Param("levEnd") Integer levEnd); |
| | | List<LocMast> queryFreeLocMastEnd(@Param("row") Integer row); |
| | | List<LocMast> queryFreeLocMastEnd0(@Param("bay") Integer bay,@Param("lev") Integer lev,@Param("row1") Integer row); |
| | | |
| | | @Select("select loc_no from asr_loc_mast where 1=1 and loc_sts = 'O' and crn_no = #{crnNo}") |
| | | List<String> queryGroupEmptyStock(Integer crnNo); |
New file |
| | |
| | | package com.zy.asrs.mapper; |
| | | |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | @Mapper |
| | | @Repository |
| | | public interface LocRuleMapper extends BaseMapper<LocRule> { |
| | | |
| | | } |
| | |
| | | */ |
| | | List<LocMast> queryFreeLocMast(List<Integer> rows, Integer rowsLen, Short locType1); |
| | | List<LocMast> queryFreeLocMast0(List<Integer> rows, Integer rowsLen, Short locType1,Boolean inoutEveryday); |
| | | List<LocMast> queryFreeLocMast1(List<Integer> rows, Integer rowsLen, Short locType1,Boolean inoutEveryday |
| | | , Integer rowBeg, Integer rowEnd, Integer bayBeg, Integer bayEnd, Integer levBeg, Integer levEnd); |
| | | List<LocMast> queryFreeLocMastEnd(Integer row); |
| | | List<LocMast> queryFreeLocMastEnd0(Integer bay,Integer lev,Integer row); |
| | | |
| | | /** |
| | | * 获取同组货架的空库位 |
New file |
| | |
| | | package com.zy.asrs.service; |
| | | |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | public interface LocRuleService extends IService<LocRule> { |
| | | |
| | | LocRule find(String matnr, String batch); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<LocMast> queryFreeLocMast1(List<Integer> rows, Integer rowsLen, Short locType1, Boolean inoutEveryday, Integer rowBeg, Integer rowEnd, Integer bayBeg, Integer bayEnd, Integer levBeg, Integer levEnd) { |
| | | return this.baseMapper.queryFreeLocMast1(rows, rowsLen, locType1,inoutEveryday, rowBeg, rowEnd, bayBeg, bayEnd, levBeg, levEnd); |
| | | } |
| | | |
| | | @Override |
| | | public List<LocMast> queryFreeLocMastEnd(Integer row){ |
| | | return this.baseMapper.queryFreeLocMastEnd(row); |
| | | } |
| | | @Override |
| | | public List<LocMast> queryFreeLocMastEnd0(Integer bay,Integer lev,Integer row){ |
| | | return this.baseMapper.queryFreeLocMastEnd0(bay,lev,row); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> queryGroupEmptyStock(String sourceLocNo) { |
| | | if (Cools.isEmpty(sourceLocNo)) { |
| | | return null; |
New file |
| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.mapper.LocRuleMapper; |
| | | import com.zy.asrs.entity.LocRule; |
| | | import com.zy.asrs.service.LocRuleService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.zy.asrs.service.MatService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("locRuleService") |
| | | public class LocRuleServiceImpl extends ServiceImpl<LocRuleMapper, LocRule> implements LocRuleService { |
| | | |
| | | @Autowired |
| | | private MatService matService; |
| | | |
| | | @Override |
| | | public LocRule find(String matnr, String batch) { |
| | | if (Cools.isEmpty(matnr)) { |
| | | return null; |
| | | } |
| | | Mat mat = matService.selectByMatnr(matnr); |
| | | if (Cools.isEmpty(mat)) { |
| | | return null; |
| | | } |
| | | LocRule locRule = null; |
| | | do { |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("matnr", matnr).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("specs", mat.getSpecs()).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("model", mat.getModel()).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | locRule = this.selectOne(new EntityWrapper<LocRule>().eq("batch", batch).eq("status", 1)); |
| | | if (null != locRule) { |
| | | break; |
| | | } |
| | | } while (false); |
| | | return locRule; |
| | | } |
| | | } |
| | |
| | | throw new CoolException(BaseRes.PARAM); |
| | | } |
| | | // 判断是否有相同条码的数据 |
| | | // if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | // eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | | // throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | // } |
| | | if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>(). |
| | | eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) { |
| | | throw new CoolException(param.getBarcode() + "数据正在进行入库"); |
| | | eq("zpallet", param.getBarcode())) > 0) { |
| | | throw new CoolException(param.getBarcode() + "组托数据已存在"); |
| | | } |
| | | |
| | | // todo: 不下线重新入库 |
| | |
| | | // 生成入库通知档 |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | param.getCombMats().forEach(elem -> { |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getMemo()); |
| | | DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getMemo(), elem.getCstmr()); |
| | | |
| | | if (Cools.isEmpty(detlDto.getBatch())){ |
| | | String batch = DateUtils.convert(new Date(),DateUtils.yyyyMMdd); |
| | | detlDto.setBatch(batch); |
| | | } |
| | | // if (Cools.isEmpty(detlDto.getBatch())){ |
| | | // String batch = DateUtils.convert(new Date(),DateUtils.yyyyMMdd); |
| | | // detlDto.setBatch(batch); |
| | | // } |
| | | |
| | | if (DetlDto.has(detlDtos, detlDto)) { |
| | | DetlDto one = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch()); |
| | |
| | | waitPakin.setModiTime(now); |
| | | waitPakin.setMemo(detlDto.getMemo()); |
| | | waitPakin.setFrozen(param.getFrozen()); // 是否冻结 |
| | | waitPakin.setManu(detlDto.getCstmr()); |
| | | if (!waitPakinService.insert(waitPakin)) { |
| | | throw new CoolException("保存入库通知档失败"); |
| | | } |
New file |
| | |
| | | package com.zy.asrs.task; |
| | | |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.MatHandler; |
| | | import com.zy.asrs.task.handler.PlcLogHandler; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class MatScheduler { |
| | | |
| | | @Autowired |
| | | private MatHandler matHandler; |
| | | |
| | | // @Scheduled(cron = "0/3 * * * * ? ") |
| | | @Scheduled(cron = "0 0 23 * * ? ") |
| | | private void execute(){ |
| | | ReturnT<String> returnT = matHandler.start(); |
| | | if (!returnT.isSuccess()) { |
| | | log.error(returnT.getMsg()); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.zy.asrs.task.handler; |
| | | |
| | | import com.core.common.Cools; |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.dto.MatnrCountDto; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.WrkDetlService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.jdbc.core.JdbcTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by vincent on 2020/7/7 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class MatHandler extends AbstractHandler<String> { |
| | | |
| | | @Autowired |
| | | private JdbcTemplate jdbcTemplate; |
| | | @Autowired |
| | | private MatService matService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | |
| | | @Transactional |
| | | public ReturnT<String> start() { |
| | | try { |
| | | Date now = new Date(); |
| | | List<Map<String, Object>> list = jdbcTemplate.queryForList("select\n" + |
| | | "matnr,\n" + |
| | | "count(1) as count\n" + |
| | | "from (\n" + |
| | | "\tselect\n" + |
| | | "\tdistinct awd.*\n" + |
| | | "\tfrom asr_wrk_mast_log awm\n" + |
| | | "\tleft join asr_wrk_detl_log awd on awm.wrk_no = awd.wrk_no\n" + |
| | | "\twhere 1=1\n" + |
| | | "\tand datediff(day, getdate(), awm.io_time) = 0 \n" + |
| | | "\tand io_type not in (103,104,107)\n" + |
| | | "\tand (manu_type is null or manu_type != '手动取消')\n" + |
| | | ") a\n" + |
| | | "group by matnr"); |
| | | if (!Cools.isEmpty(list)) { |
| | | for (Map<String, Object> map : list) { |
| | | MatnrCountDto dto = Cools.conver(map, MatnrCountDto.class); |
| | | if (dto.getCount() >= 3) { |
| | | Mat mat = matService.selectByMatnr(dto.getMatnr()); |
| | | mat.setInoutEveryday(Boolean.TRUE); |
| | | mat.setUpdateTime(now); |
| | | if (!matService.updateById(mat)) { |
| | | log.error("{}商品修改为高频属性失败!", dto.getMatnr()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return FAIL.setMsg(e.getMessage()); |
| | | } |
| | | return SUCCESS; |
| | | } |
| | | |
| | | } |
| | |
| | | // generator.table="sys_host"; |
| | | // sqlserver |
| | | generator.sqlOsType = SqlOsType.SQL_SERVER; |
| | | generator.url="192.168.4.15:1433;databasename=bfasrs"; |
| | | generator.url="localhost:1433;databasename=bfasrs"; |
| | | generator.username="sa"; |
| | | generator.password="sa@123"; |
| | | generator.table="asr_check_record"; |
| | | generator.table="asr_loc_rule"; |
| | | generator.packagePath="com.zy.asrs"; |
| | | generator.build(); |
| | | } |
| | |
| | | |
| | | private String memo; |
| | | |
| | | private String cstmr; |
| | | |
| | | |
| | | public DetlDto() { |
| | | } |
| | |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public DetlDto(String matnr, String batch, Double anfme, String memo) { |
| | | public DetlDto(String matnr, String batch, Double anfme, String memo, String cstmr) { |
| | | this.matnr = matnr; |
| | | this.batch = batch; |
| | | this.anfme = anfme; |
| | | this.memo = memo; |
| | | this.cstmr = cstmr; |
| | | } |
| | | |
| | | |
| | |
| | | private SlaveProperties slaveProperties; |
| | | @Autowired |
| | | private MatService matService; |
| | | @Autowired |
| | | private LocRuleService locRuleService; |
| | | |
| | | /** |
| | | * 生成工作号 |
| | |
| | | whsType = 1; |
| | | start = 1; |
| | | end = 14; |
| | | if (null != wrkMastService.selectPakoutOfStaNo(104)) { |
| | | start = 8; |
| | | theCrnNo = 2; |
| | | } |
| | | // if (null != wrkMastService.selectPakoutOfStaNo(104)) { |
| | | // start = 8; |
| | | // theCrnNo = 2; |
| | | // } |
| | | break; |
| | | case 203: |
| | | whsType = 2; |
| | | start = 8; |
| | | end = 21; |
| | | if (null != wrkMastService.selectPakoutOfStaNo(204)) { |
| | | end = 14; |
| | | theCrnNo = 2; |
| | | } |
| | | // if (null != wrkMastService.selectPakoutOfStaNo(204)) { |
| | | // end = 14; |
| | | // theCrnNo = 2; |
| | | // } |
| | | break; |
| | | default: |
| | | throw new CoolException("检索库位失败,请联系管理员"); |
| | |
| | | |
| | | // 1.当检索库排为浅库位排时,优先寻找当前库排的深库位排 |
| | | if (locMast == null) { |
| | | List<Integer> rows = Utils.getGroupLoc(curRow); |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast0(rows, rows.size(), locTypeDto.getLocType1(), inoutEveryday); |
| | | if (!Cools.isEmpty(locMasts)) { |
| | | Integer innermostRow = Utils.getInnermostRow(locMasts.get(0).getLocNo()); |
| | | for (LocMast one : locMasts) { |
| | | if (one.getRow1().equals(innermostRow)) { |
| | | locMast = one; |
| | | break; |
| | | |
| | | // 库区锁定 |
| | | LocRule locRule = locRuleService.find(Cools.isEmpty(matNos) ? null : matNos.get(0), null); |
| | | if (!Cools.isEmpty(locRule)) { |
| | | List<Integer> rows = Utils.getGroupLoc(locRule.getRowBeg()); |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast1(rows, rows.size(), locTypeDto.getLocType1(), inoutEveryday |
| | | , locRule.getRowBeg(), locRule.getRowEnd(), locRule.getBayBeg(), locRule.getBayEnd(), locRule.getLevBeg(), locRule.getLevEnd()); |
| | | if (!Cools.isEmpty(locMasts)) { |
| | | Integer innermostRow = Utils.getInnermostRow(locMasts.get(0).getLocNo()); |
| | | for (LocMast one : locMasts) { |
| | | if (one.getRow1().equals(innermostRow)) { |
| | | locMast = one; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (locMast == null) { |
| | | List<Integer> rows = Utils.getGroupLoc(curRow); |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMast0(rows, rows.size(), locTypeDto.getLocType1(), inoutEveryday); |
| | | if (!Cools.isEmpty(locMasts)) { |
| | | Integer innermostRow = Utils.getInnermostRow(locMasts.get(0).getLocNo()); |
| | | for (LocMast one : locMasts) { |
| | | if (one.getRow1().equals(innermostRow)) { |
| | | locMast = one; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // LocMast locMast0 = locMastService.findOutMost(locMasts.stream().map(LocMast::getLocNo).distinct().collect(Collectors.toList())); |
| | | // if (!Cools.isEmpty(locMast0)) { |
| | | // locMast = locMast0; |
| | | // } |
| | | // 因库位移转、需预留空库位 todo:luxiaotao |
| | | // if (!locMastService.checkEmptyCount(locMast)) { |
| | | // locMast = null; |
| | | // } |
| | | } |
| | | |
| | | // 2.库位当前所属尺寸无空库位时,调整尺寸参数,向上兼容检索库位 |
| | | // 2.无库位时,无视区域锁定,重新查找库位 |
| | | if (Cools.isEmpty(locMast)){ |
| | | List<LocMast> locMasts = locMastService.queryFreeLocMastEnd(curRow); |
| | | int sign=curRow; |
| | | while (true){ |
| | | if (locMasts.size()==0){ |
| | | sign = getCurRow(sign); |
| | | if (sign != 0){ |
| | | locMasts = locMastService.queryFreeLocMastEnd(sign); |
| | | }else { |
| | | break; |
| | | } |
| | | }else { |
| | | break; |
| | | } |
| | | } |
| | | for (LocMast locMast1 : locMasts){ |
| | | List<LocMast> locMasts1 = locMastService.queryFreeLocMastEnd0(locMast1.getBay1(), locMast1.getLev1(),locMast1.getRow1()); |
| | | Integer innermostRow = Utils.getInnermostRow(locMasts1.get(0).getLocNo()); |
| | | for (LocMast locMast2:locMasts1){ |
| | | if (locMast2.getLocSts().equals("O")){ |
| | | if (locMast2.getRow1().equals(innermostRow)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } |
| | | }else if (!locMast2.getLocSts().equals("F")){ |
| | | break; |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(locMast)){ |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 3.库位当前所属尺寸无空库位时,调整尺寸参数,向上兼容检索库位 |
| | | if (Cools.isEmpty(locMast)) { |
| | | // 当前巷道无空库位时,递归调整至下一巷道,检索全部巷道无果后,跳出递归 |
| | | if (times < rowCount) { |
| | |
| | | } |
| | | } |
| | | |
| | | public int getCurRow(int curRow){ |
| | | switch (curRow){ |
| | | case 1: |
| | | case 2: |
| | | case 8: |
| | | case 9: |
| | | case 10: |
| | | case 15: |
| | | case 16: |
| | | case 17: |
| | | return curRow+1; |
| | | case 5: |
| | | case 6: |
| | | case 7: |
| | | case 13: |
| | | case 14: |
| | | case 20: |
| | | case 21: |
| | | return curRow-1; |
| | | default: |
| | | return 0; |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | enabled: false |
| | | datasource: |
| | | driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver |
| | | # url: jdbc:sqlserver://10.10.10.100:1433;databasename=bfasrs |
| | | url: jdbc:sqlserver://10.10.10.100:1433;databasename=bfasrs |
| | | # url: jdbc:sqlserver://localhost:1433;databasename=bfasrs |
| | | url: jdbc:sqlserver://192.168.4.15:1433;databasename=bfasrs |
| | | username: sa |
| | | # password: Zoneyung@zy56$ |
| | | password: sa@123 |
| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.CheckRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="loc_no" property="locNo" /> |
| | | <result column="barcode" property="barcode" /> |
| | | <result column="matnr" property="matnr" /> |
| | |
| | | select * from |
| | | ( |
| | | select |
| | | ROW_NUMBER() over (order by a.appe_time,a.matnr,a.loc_no) as row, |
| | | ROW_NUMBER() over (order by a.loc_no,a.appe_time,a.matnr) as row, |
| | | a.* |
| | | from asr_loc_detl a |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' and b.frozen != 1 |
| | | and a.manu is null |
| | | and a.matnr = #{matnr} |
| | | and b.row1 >= 1 |
| | | and b.row1 <= 3 |
| | |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' and b.frozen != 1 |
| | | and a.manu is null |
| | | and a.matnr = #{matnr} |
| | | and b.row1 >= 4 |
| | | and b.row1 <= 7 |
| | |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' and b.frozen != 1 |
| | | and a.manu is null |
| | | and a.matnr = #{matnr} |
| | | and b.row1 >= 8 |
| | | and b.row1 <= 11 |
| | |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' and b.frozen != 1 |
| | | and a.manu is null |
| | | and a.matnr = #{matnr} |
| | | and b.row1 >= 12 |
| | | and b.row1 <= 14 |
| | |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' and b.frozen != 1 |
| | | and a.manu is null |
| | | and a.matnr = #{matnr} |
| | | and b.row1 >= 15 |
| | | and b.row1 <= 18 |
| | |
| | | left join asr_loc_mast b on a.loc_no = b.loc_no |
| | | where 1=1 |
| | | and b.loc_sts = 'F' and b.frozen != 1 |
| | | and a.manu is null |
| | | and a.matnr = #{matnr} |
| | | and b.row1 >= 19 |
| | | and b.row1 <= 21 |
| | |
| | | </if> |
| | | <choose> |
| | | <when test="inoutEveryday != null and inoutEveryday"> |
| | | AND bay1 < 11 |
| | | AND bay1 < 11 and lev1 in (3,4) |
| | | </when> |
| | | <otherwise> |
| | | AND bay1 > 10 |
| | | AND (bay1 >= 11 or (bay1 < 11 and lev1 in (1,2))) |
| | | </otherwise> |
| | | </choose> |
| | | and loc_no not in ('0100101', '0200101', '0300101', '1200701', '1300701', '1400701', '1900401', '2000401', '2100401') |
| | |
| | | ) |
| | | </select> |
| | | |
| | | <select id="queryFreeLocMast1" resultMap="BaseResultMap"> |
| | | select |
| | | * |
| | | from asr_loc_mast |
| | | where 1=1 |
| | | and row1 in |
| | | <foreach item="item" collection="rows" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and ctn_no = |
| | | ( |
| | | select |
| | | top 1 |
| | | ctn_no |
| | | from ( |
| | | select |
| | | ctn_no, |
| | | count(1) as count |
| | | from asr_loc_mast |
| | | where 1=1 |
| | | and row1 in |
| | | <foreach item="item" collection="rows" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | and loc_sts = 'O' |
| | | |
| | | <if test="rowBeg != null"> |
| | | and row1 >= #{rowBeg} |
| | | </if> |
| | | <if test="rowEnd != null"> |
| | | and row1 <= #{rowEnd} |
| | | </if> |
| | | <if test="bayBeg != null"> |
| | | and bay1 >= #{bayBeg} |
| | | </if> |
| | | <if test="bayEnd != null"> |
| | | and bay1 <= #{bayEnd} |
| | | </if> |
| | | <if test="levBeg != null"> |
| | | and lev1 >= #{levBeg} |
| | | </if> |
| | | <if test="levEnd != null"> |
| | | and lev1 <= #{levEnd} |
| | | </if> |
| | | |
| | | <if test="locType1 != null"> |
| | | and loc_type1 = #{locType1} |
| | | </if> |
| | | |
| | | <choose> |
| | | <when test="inoutEveryday != null and inoutEveryday"> |
| | | AND bay1 < 11 and lev1 in (3,4) |
| | | </when> |
| | | <otherwise> |
| | | AND (bay1 >= 11 or (bay1 < 11 and lev1 in (1,2))) |
| | | </otherwise> |
| | | </choose> |
| | | and loc_no not in ('0100101', '0200101', '0300101', '1200701', '1300701', '1400701', '1900401', '2000401', '2100401') |
| | | group by ctn_no |
| | | ) a |
| | | where count = #{rowsLen} |
| | | order by right(ctn_no, 2) + 0 asc, left(ctn_no, 3) + 0 asc |
| | | ) |
| | | </select> |
| | | |
| | | <select id="queryFreeLocMastEnd" resultMap="BaseResultMap"> |
| | | select * |
| | | from asr_loc_mast |
| | | where row1=#{row} |
| | | and loc_sts='O' |
| | | and loc_no not in ('0100101', '0200101', '0300101', '1200701', '1300701', '1400701', '1900401', '2000401', '2100401') |
| | | order by loc_sts desc ,lev1 asc,bay1 asc |
| | | </select> |
| | | |
| | | <select id="queryFreeLocMastEnd0" resultMap="BaseResultMap"> |
| | | select * |
| | | from asr_loc_mast |
| | | where bay1=#{bay} |
| | | and lev1=#{lev} |
| | | -- and loc_sts='O' |
| | | and loc_no not in ('0100101', '0200101', '0300101', '1200701', '1300701', '1400701', '1900401', '2000401', '2100401') |
| | | <if test="row1 >= 1 and row1 <= 3"> |
| | | and row1 >= 1 and row1 <= 3 |
| | | order by loc_sts desc ,row1 asc |
| | | </if> |
| | | <if test="row1 >= 4 and row1 <= 7"> |
| | | and row1 >= 4 and row1 <= 7 |
| | | order by loc_sts desc ,row1 desc |
| | | </if> |
| | | <if test="row1 >= 8 and row1 <= 11"> |
| | | and row1 >= 8 and row1 <= 11 |
| | | order by loc_sts desc ,row1 asc |
| | | </if> |
| | | <if test="row1 >= 12 and row1 <= 14"> |
| | | and row1 >= 12 and row1 <= 14 |
| | | order by loc_sts desc ,row1 desc |
| | | </if> |
| | | <if test="row1 >= 15 and row1 <= 18"> |
| | | and row1 >= 15 and row1 <= 18 |
| | | order by loc_sts desc ,row1 asc |
| | | </if> |
| | | <if test="row1 >= 19 and row1 <= 21"> |
| | | and row1 >= 19 and row1 <= 21 |
| | | order by loc_sts desc ,row1 desc |
| | | </if> |
| | | </select> |
| | | |
| | | </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.asrs.mapper.LocRuleMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocRule"> |
| | | <id column="id" property="id" /> |
| | | <result column="matnr" property="matnr" /> |
| | | <result column="specs" property="specs" /> |
| | | <result column="model" property="model" /> |
| | | <result column="cstmr" property="cstmr" /> |
| | | <result column="batch" property="batch" /> |
| | | <result column="other" property="other" /> |
| | | <result column="row_beg" property="rowBeg" /> |
| | | <result column="row_end" property="rowEnd" /> |
| | | <result column="bay_beg" property="bayBeg" /> |
| | | <result column="bay_end" property="bayEnd" /> |
| | | <result column="lev_beg" property="levBeg" /> |
| | | <result column="lev_end" property="levEnd" /> |
| | | <result column="limit" property="limit" /> |
| | | <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" /> |
| | | |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <if test="specs != null and specs != ''"> |
| | | and mm.specs like concat('%',#{specs},'%') |
| | | </if> |
| | | ORDER BY mm.create_time DESC |
| | | ORDER BY mm.inout_everyday desc, mm.create_time DESC |
| | | </select> |
| | | |
| | | <select id="selectByMatnr" resultMap="BaseResultMap"> |
| | |
| | | <if test="loc_no!=null and loc_no!='' "> |
| | | and asr_loc_mast.loc_no like '%' + #{loc_no} + '%' |
| | | </if> |
| | | <if test="specs!=null and specs!='' "> |
| | | and specs like '%' + #{specs} + '%' |
| | | </if> |
| | | <if test="matnr!=null and matnr!='' "> |
| | | and matnr like '%' + #{matnr} + '%' |
| | | </if> |
| | |
| | | select top 1 * from ( |
| | | select top 1 * from asr_wrk_mast where 1=1 |
| | | and crn_no = 2 |
| | | and wrk_sts in (11,12,13,14,15,16,17) |
| | | and wrk_sts in (12,13,14,15,16) |
| | | and source_sta_no = #{staNo} |
| | | and io_type in (101.103,104,107,110) |
| | | union |
| | |
| | | ,{field: 'anfme', align: 'center',title: '盘点前数量'} |
| | | ,{field: 'confirmQty', align: 'center',title: '盘点确认量'} |
| | | ,{field: 'adjQty$', align: 'center',title: '盘点差异量'} |
| | | ,{field: 'createTime$', align: 'center',title: '记录时间'} |
| | | ,{field: 'createTime$', align: 'center',title: '记录时间', width: 180} |
| | | ,{field: 'type', align: 'center',title: '财务审核', templet: '#statusTpl', width: 100} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | |
| | | case "del": |
| | | del([data.locNo]); |
| | | break; |
| | | case "auditing": |
| | | layer.confirm('确定审核通过?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/checkRecord/auditing/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {id: data.id}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | break |
| | | } |
| | | }); |
| | | |
| | |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'maktx', align: 'center',title: '商品名称', sort:true} |
| | | ,{field: 'orderNo', align: 'center',title: '单据编号', hide: false} |
| | | ,{field: 'batch', align: 'center',title: '批号', width: 200, sort:true} |
| | | ,{field: 'batch', align: 'center',title: '批号', sort:true} |
| | | ,{field: 'anfme', align: 'center',title: '数量'} |
| | | ,{field: 'zpallet', align: 'center',title: '托盘条码'} |
| | | |
| | |
| | | ,{field: 'units', align: 'center',title: '单位量', hide: true} |
| | | ,{field: 'barcode', align: 'center',title: '条码', hide: true} |
| | | ,{field: 'origin', align: 'center',title: '产地', hide: true} |
| | | ,{field: 'manu', align: 'center',title: '厂家', hide: true} |
| | | ,{field: 'manu', align: 'center',title: '客户信息', hide: false} |
| | | ,{field: 'manuDate', align: 'center',title: '生产日期', hide: true} |
| | | ,{field: 'itemNum', align: 'center',title: '品项数', hide: true} |
| | | ,{field: 'safeQty', align: 'center',title: '安全库存量', hide: true} |
New file |
| | |
| | | var pageCurr; |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).use(['table','laydate', 'form', 'admin'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var layDate = layui.laydate; |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#locRule', |
| | | headers: {token: localStorage.getItem('token')}, |
| | | url: baseUrl+'/locRule/list/auth', |
| | | page: true, |
| | | limit: 15, |
| | | limits: [15, 30, 50, 100, 200, 500], |
| | | toolbar: '#toolbar', |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | // ,{field: 'id', align: 'center',title: 'ID'} |
| | | ,{field: 'matnr', align: 'center',title: '商品编号'} |
| | | ,{field: 'specs', align: 'center',title: '规格'} |
| | | ,{field: 'model', align: 'center',title: '型号'} |
| | | ,{field: 'cstmr', align: 'center',title: '客户'} |
| | | ,{field: 'batch', align: 'center',title: '批号'} |
| | | ,{field: 'other', align: 'center',title: '其他', hide: true} |
| | | ,{field: 'rowBeg', align: 'center',title: '开始排'} |
| | | ,{field: 'rowEnd', align: 'center',title: '结束排'} |
| | | ,{field: 'bayBeg', align: 'center',title: '开始列'} |
| | | ,{field: 'bayEnd', align: 'center',title: '结束列'} |
| | | ,{field: 'levBeg', align: 'center',title: '开始层'} |
| | | ,{field: 'levEnd', align: 'center',title: '结束层'} |
| | | ,{field: 'limit', align: 'center',title: '上限'} |
| | | ,{field: 'status$', align: 'center',title: '状态', hide: true} |
| | | ,{field: 'createBy$', align: 'center',title: '添加人员', hide: true} |
| | | ,{field: 'createTime$', align: 'center',title: '添加时间', hide: true} |
| | | ,{field: 'updateBy$', align: 'center',title: '修改人员', hide: true} |
| | | ,{field: 'updateTime$', align: 'center',title: '修改时间', hide: true} |
| | | ,{field: 'memo', align: 'center',title: '备注', hide: true} |
| | | |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | | 'count': res.data.total, |
| | | 'data': res.data.records |
| | | } |
| | | }, |
| | | response: { |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | } |
| | | }); |
| | | |
| | | // 监听排序事件 |
| | | table.on('sort(locRule)', function (obj) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | searchData['orderByField'] = obj.field; |
| | | searchData['orderByType'] = obj.type; |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: 1} |
| | | }); |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | | table.on('toolbar(locRule)', function (obj) { |
| | | var checkStatus = table.checkStatus(obj.config.id).data; |
| | | switch(obj.event) { |
| | | case 'addData': |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'locRule': exportData, |
| | | 'fields': fields |
| | | }; |
| | | $.ajax({ |
| | | url: baseUrl+"/locRule/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: JSON.stringify(param), |
| | | dataType:'json', |
| | | contentType:'application/json;charset=UTF-8', |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.closeAll(); |
| | | if (res.code === 200) { |
| | | table.exportFile(titles,res.data,'xls'); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}) |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | // 监听行工具事件 |
| | | table.on('tool(locRule)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | | case "del": |
| | | del([data.id]); |
| | | break; |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | | area: '1000px', |
| | | title: (mData ? '修改' : '添加') + '库区规则', |
| | | content: $('#editDialog').html(), |
| | | success: function (layero, dIndex) { |
| | | layDateRender(mData); |
| | | form.val('detail', mData); |
| | | form.on('submit(editSubmit)', function (data) { |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/locRule/"+(mData?'update':'add')+"/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: data.field, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.close(dIndex); |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | $(layero).children('.layui-layer-content').css('overflow', 'visible'); |
| | | layui.form.render('select'); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/locRule/delete/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {ids: ids}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | layDate.render({ |
| | | elem: '#updateTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['updateTime\\$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | | |
| | | function tableReload(child) { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | } |
| | |
| | | return html; |
| | | }} |
| | | ,{field: 'modiUser$', align: 'center',title: '修改人员', hide:true} |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间', hide:true}) |
| | | ,{field: 'modiTime$', align: 'center',title: '修改时间'}) |
| | | return cols; |
| | | } |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">财务审核:</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="status"> |
| | | <option value="">选择状态</option> |
| | | <option value="0">未审核</option> |
| | | <option value="1">已审核</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | {{# if( d.status === 0 ){ }} |
| | | <a class="layui-btn layui-btn-xs" lay-event="auditing">财务审核</a> |
| | | {{# } }} |
| | | </script> |
| | | <script type="text/html" id="statusTpl"> |
| | | {{# if( d.status === 1 ){ }} |
| | | <span name="status" class="layui-badge layui-badge-green">已审核</span> |
| | | {{# } else if(d.status === 0){ }} |
| | | <span name="status" class="layui-badge layui-badge-red">未审核</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | .layui-form.layui-border-box.layui-table-view { |
| | | border-top: 1px solid rgba(0,0,0,.1); |
| | | } |
| | | #search-box { |
| | | margin-left: 10px; |
| | | z-index: 999; |
| | | position: relative; |
| | | padding: 0 30px 10px 30px; |
| | | } |
| | | </style> |
| | | </head> |
| | | <body> |
| | |
| | | <div class="home-elem loc-retention"> |
| | | <div class="layui-form"> |
| | | <div id="form-header">库存滞留时间统计表</div> |
| | | <div class="layui-card" style="padding: 0 20px 1px 20px;"> |
| | | <fieldset class="layui-elem-field site-demo-button" style="margin: 20px;"> |
| | | <legend>搜索栏</legend> |
| | | <div id="search-box" class="layui-form layui-card-header"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="matnr" placeholder="商品编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="specs" placeholder="规格" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 待添加 --> |
| | | <div id="data-search-btn" class="layui-btn-container layui-form-item" style="display: inline-block"> |
| | | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> |
| | | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> |
| | | </div> |
| | | </div> |
| | | </fieldset> |
| | | |
| | | </div> |
| | | <table class="layui-hide" id="stayTime" lay-filter="stayTime"></table> |
| | | </div> |
| | | </div> |
| | |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | | var form = layui.form; |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | |
| | | pageSize: 'limit' |
| | | }, |
| | | parseData: function (res) { |
| | | console.log(res) |
| | | return { |
| | | 'code': res.code, |
| | | 'msg': res.msg, |
| | |
| | | }, |
| | | done: function(res, curr, count) { |
| | | var that = this.elem.next(); |
| | | console.log(res.data) |
| | | res.data.forEach(function (item, index) { |
| | | var tr = that.find(".layui-table-box tbody tr[data-index='" + index + "']"); |
| | | if (item.store_max_date != null) { |
| | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(search)', function (data) { |
| | | tableReload(); |
| | | }); |
| | | // 搜索栏搜索事件 |
| | | form.on('submit(reset)', function (data) { |
| | | $(':input', $('#search-box')) |
| | | .val('') |
| | | .removeAttr('checked') |
| | | .removeAttr('selected'); |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData |
| | | }); |
| | | |
| | | }); |
| | | |
| | | function tableReload() { |
| | | var searchData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | |
New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | </head> |
| | | <body> |
| | | |
| | | <div class="layui-fluid"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar" id="search-box"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input layui-laydate-range" name="create_time" type="text" placeholder="起始时间 - 终止时间" autocomplete="off" style="width: 300px"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="condition" placeholder="请输入" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline">  |
| | | <button class="layui-btn icon-btn" lay-filter="search" lay-submit> |
| | | <i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> |
| | | <i class="layui-icon"></i>重置 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="locRule" lay-filter="locRule"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/html" id="toolbar"> |
| | | <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-sm layui-btn-danger" id="btn-delete" lay-event="deleteData">删除</button> |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <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/locRule/locRule.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md6"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">商品编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="matnr" placeholder="请输入商品编号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">规格: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="specs" placeholder="请输入规格"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">型号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="model" placeholder="请输入型号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">客户: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="cstmr" placeholder="请输入客户"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">批号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="batch" placeholder="请输入批号"> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="layui-form-item">--> |
| | | <!-- <label class="layui-form-label">其他: </label>--> |
| | | <!-- <div class="layui-input-block">--> |
| | | <!-- <input class="layui-input" name="other" placeholder="请输入其他">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">上限: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="limit" placeholder="请输入上限"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <div class="layui-col-md6"> |
| | | <!-- <div class="layui-inline">--> |
| | | <!-- <label class="layui-form-label">排范围</label>--> |
| | | <!-- <div class="layui-input-inline" style="width: 100px;">--> |
| | | <!-- <input type="text" name="price_min" placeholder="¥" autocomplete="off" class="layui-input">--> |
| | | <!-- </div>--> |
| | | <!-- <div class="layui-form-mid">-</div>--> |
| | | <!-- <div class="layui-input-inline" style="width: 100px;">--> |
| | | <!-- <input type="text" name="price_max" placeholder="¥" autocomplete="off" class="layui-input">--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">开始排: </label> |
| | | <div class="layui-input-block"> |
| | | <input type="number" min="1" class="layui-input" name="rowBeg" placeholder="请输入开始排" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">结束排: </label> |
| | | <div class="layui-input-block"> |
| | | <input type="number" min="1" class="layui-input" name="rowEnd" placeholder="请输入结束排" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">开始列: </label> |
| | | <div class="layui-input-block"> |
| | | <input type="number" min="1" class="layui-input" name="bayBeg" placeholder="请输入开始列" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">结束列: </label> |
| | | <div class="layui-input-block"> |
| | | <input type="number" min="1" class="layui-input" name="bayEnd" placeholder="请输入结束列" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">开始层: </label> |
| | | <div class="layui-input-block"> |
| | | <input type="number" min="1" class="layui-input" name="levBeg" placeholder="请输入开始层" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label layui-form-required">结束层: </label> |
| | | <div class="layui-input-block"> |
| | | <input type="number" min="1" class="layui-input" name="levEnd" placeholder="请输入结束层" lay-vertype="tips" lay-verify="required" required=""> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <input class="layui-input" type="text" name="pakin_id" placeholder="入库通知号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input class="layui-input" type="text" name="zpallet" placeholder="托盘号" autocomplete="off"> |
| | | </div> |
| | | </div> |
| | | <!-- 日期范围 --> |
| | | <div class="layui-inline" style="width: 300px"> |
| | | <div class="layui-input-inline"> |