Commit c561c0276186b254e1d8fda26651801ea9a04b8b

Authored by 易文鹏
2 parents 0c867bd5 ffff903a

Merge remote-tracking branch 'origin/develop' into develop

src/main/java/com/huaheng/pc/config/camera/controller/CameraController.java 0 → 100644
  1 +package com.huaheng.pc.config.camera.controller;
  2 +
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.metadata.IPage;
  5 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  6 +import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  7 +import com.huaheng.common.utils.security.ShiroUtils;
  8 +import com.huaheng.framework.web.page.PageDomain;
  9 +import com.huaheng.framework.web.page.TableDataInfo;
  10 +import com.huaheng.framework.web.page.TableSupport;
  11 +import com.huaheng.common.utils.StringUtils;
  12 +import com.huaheng.pc.config.camera.service.ICameraService;
  13 +import com.huaheng.pc.system.user.domain.User;
  14 +import org.apache.shiro.authz.annotation.RequiresPermissions;
  15 +import org.springframework.stereotype.Controller;
  16 +import org.springframework.ui.ModelMap;
  17 +import org.springframework.web.bind.annotation.GetMapping;
  18 +import org.springframework.web.bind.annotation.PathVariable;
  19 +import org.springframework.web.bind.annotation.PostMapping;
  20 +import org.springframework.web.bind.annotation.RequestMapping;
  21 +import org.springframework.web.bind.annotation.ResponseBody;
  22 +import com.huaheng.framework.aspectj.lang.annotation.Log;
  23 +import com.huaheng.framework.aspectj.lang.constant.BusinessType;
  24 +import com.huaheng.pc.config.camera.domain.Camera;
  25 +import com.huaheng.framework.web.controller.BaseController;
  26 +import com.huaheng.framework.web.domain.AjaxResult;
  27 +import com.huaheng.common.support.Convert;
  28 +import javax.annotation.Resource;
  29 +import java.util.Arrays;
  30 +import java.util.List;
  31 +
  32 +
  33 +@Controller
  34 +@RequestMapping("/config/camera")
  35 +public class CameraController extends BaseController {
  36 + private String prefixSB = "config/camera";
  37 +
  38 + @Resource
  39 + private ICameraService cameraService;
  40 +
  41 + @GetMapping("/openCamera")
  42 + public String camera() {
  43 + return prefixSB+"/camera.html";
  44 + }
  45 +
  46 + /**
  47 + * 查询【请填写功能名称】列表
  48 + */
  49 + @RequiresPermissions("config:camera:list")
  50 + @PostMapping("/list")
  51 + @ResponseBody
  52 + public TableDataInfo list(Camera camera) {
  53 + LambdaQueryWrapper<Camera> lambdaQueryWrapper = Wrappers.lambdaQuery();
  54 + lambdaQueryWrapper
  55 + .eq(StringUtils.isNotEmpty(camera.getWarehouseCode()), Camera::getWarehouseCode, camera.getWarehouseCode())
  56 + .eq(StringUtils.isNotEmpty(camera.getCompanyCode()), Camera::getCompanyCode, camera.getCompanyCode())
  57 + .eq(StringUtils.isNotEmpty(camera.getIp()), Camera::getIp, camera.getIp())
  58 + .eq(StringUtils.isNotEmpty(camera.getPort()), Camera::getPort, camera.getPort())
  59 + .like(StringUtils.isNotEmpty(camera.getUserName()), Camera::getUserName, camera.getUserName())
  60 + .eq(StringUtils.isNotEmpty(camera.getPassword()), Camera::getPassword, camera.getPassword())
  61 + .eq(StringUtils.isNotEmpty(camera.getUseKey()), Camera::getUseKey, camera.getUseKey())
  62 + .eq(StringUtils.isNotNull(camera.getIsEnable()), Camera::getIsEnable, camera.getIsEnable())
  63 + .eq(StringUtils.isNotNull(camera.getIsLocked()), Camera::getIsLocked, camera.getIsLocked())
  64 + .eq(StringUtils.isNotNull(ShiroUtils.getWarehouseCode()),Camera::getWarehouseCode,ShiroUtils.getWarehouseCode());
  65 + PageDomain pageDomain = TableSupport.buildPageRequest();
  66 + Integer pageNum = pageDomain.getPageNum();
  67 + Integer pageSize = pageDomain.getPageSize();
  68 + if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)){
  69 + /*使用分页查询*/
  70 + Page<Camera> page = new Page<>(pageNum, pageSize);
  71 + IPage<Camera> iPage = cameraService.page(page, lambdaQueryWrapper);
  72 + return getMpDataTable(iPage.getRecords(), iPage.getTotal());
  73 + } else {
  74 + List<Camera> list = cameraService.list(lambdaQueryWrapper);
  75 + return getDataTable(list);
  76 + }
  77 + }
  78 +
  79 + /**
  80 + * 新增【请填写功能名称】
  81 + */
  82 + @GetMapping("/add")
  83 + public String add() {
  84 + return prefixSB + "/add";
  85 + }
  86 +
  87 + /**
  88 + * 新增保存【请填写功能名称】
  89 + */
  90 + @RequiresPermissions("config:camera:add")
  91 + @Log(title = "【请填写功能名称】", action = BusinessType.INSERT)
  92 + @PostMapping("/add")
  93 + @ResponseBody
  94 + public AjaxResult addSave(Camera camera) {
  95 + if(camera == null){
  96 + return AjaxResult.error("摄像头信息为空");
  97 + }
  98 + camera.setWarehouseCode(ShiroUtils.getWarehouseCode());
  99 + camera.setCompanyCode(ShiroUtils.getCompanyCodeList().get(0));
  100 + camera.setIsEnable(0);
  101 + camera.setIsLocked(0);
  102 + return toAjax(cameraService.save(camera));
  103 + }
  104 +
  105 + @GetMapping("/bindCamera/{id}")
  106 + public String bindCamera(@PathVariable("id") Integer id, ModelMap mmap)
  107 + {
  108 + mmap.put("camera", cameraService.getById(id));
  109 + return prefixSB + "/bindCamera";
  110 + }
  111 +
  112 + @Log(title = "配置-摄像头设置", operating = "绑定摄像头", action = BusinessType.UPDATE)
  113 + @PostMapping("/bindUpdate")
  114 + @ResponseBody
  115 + public AjaxResult bindUpdate(Camera camera)
  116 + {
  117 + if(camera.getUseKey()==null){
  118 + return error("摄像头绑定失败!!!");
  119 + }
  120 + LambdaQueryWrapper<Camera> queryWrapper = Wrappers.lambdaQuery();
  121 + queryWrapper.eq(StringUtils.isNotEmpty(camera.getUseKey()),Camera::getUseKey,camera.getUseKey());
  122 + Camera only = cameraService.getOne(queryWrapper);
  123 + if(only!=null){
  124 + return error(only.getBindName()+":已经被绑定【 "+only.getIp()+" 】请先解绑,在进行绑定!!");
  125 + }
  126 + camera.setIsEnable(1);
  127 + camera.setUseKey(camera.getUseKey());
  128 + if (cameraService.updateById(camera))
  129 + {
  130 + return success();
  131 + }
  132 + return error();
  133 + }
  134 +
  135 +
  136 + @GetMapping("/cameraReset/{id}")
  137 + public String resetPwd(@PathVariable("id") Integer id, ModelMap mmap)
  138 + {
  139 + mmap.put("camera", cameraService.getById(id));
  140 + return prefixSB + "/cameraReset";
  141 + }
  142 +
  143 + @Log(title = "配置-摄像头设置", operating = "修改密码", action = BusinessType.UPDATE)
  144 + @PostMapping("/cameraReset")
  145 + @ResponseBody
  146 + public AjaxResult resetPwd(Camera camera)
  147 + {
  148 + boolean flag = cameraService.updateById(camera);
  149 + if (flag)
  150 + {
  151 + return success();
  152 + }
  153 + return error();
  154 + }
  155 +
  156 + @Log(title = "配置-摄像头设置", operating = "解绑", action = BusinessType.UPDATE)
  157 + @PostMapping("/unBind/{id}")
  158 + @ResponseBody
  159 + public AjaxResult unBind(@PathVariable("id") Integer id)
  160 + {
  161 + Camera camera = cameraService.getById(id);
  162 + if(camera==null){
  163 + return error();
  164 + }
  165 + camera.setUseKey("");
  166 + camera.setBindName("");
  167 + camera.setIsEnable(0);
  168 + boolean flag = cameraService.updateById(camera);
  169 + if (flag)
  170 + {
  171 + return success();
  172 + }
  173 + return error();
  174 + }
  175 +
  176 + /**
  177 + * 修改【请填写功能名称】
  178 + */
  179 + @GetMapping("/edit/{id}")
  180 + public String edit(@PathVariable("id") Integer id, ModelMap mmap) {
  181 + Camera camera = cameraService.getById(id);
  182 + mmap.put("camera", camera);
  183 + return prefixSB + "/edit";
  184 + }
  185 +
  186 + /**
  187 + * 修改保存【请填写功能名称】
  188 + */
  189 + @RequiresPermissions("config:camera:edit")
  190 + @Log(title = "【请填写功能名称】", action = BusinessType.UPDATE)
  191 + @PostMapping("/edit")
  192 + @ResponseBody
  193 + public AjaxResult editSave(Camera camera) {
  194 + return toAjax(cameraService.updateById(camera));
  195 + }
  196 +
  197 + /**
  198 + * 删除【请填写功能名称】
  199 + */
  200 + @RequiresPermissions("config:camera:remove")
  201 + @Log(title = "【请填写功能名称】", action = BusinessType.DELETE)
  202 + @PostMapping( "/remove")
  203 + @ResponseBody
  204 + public AjaxResult remove(String ids) {
  205 + if (StringUtils.isEmpty(ids)){
  206 + return AjaxResult.error("id不能为空");
  207 + }
  208 + return toAjax(cameraService.removeByIds(Arrays.asList(Convert.toIntArray(ids))));
  209 + }
  210 +
  211 +}
... ...
src/main/java/com/huaheng/pc/config/camera/domain/Camera.java 0 → 100644
  1 +package com.huaheng.pc.config.camera.domain;
  2 +
  3 +import com.baomidou.mybatisplus.annotation.IdType;
  4 +import com.baomidou.mybatisplus.annotation.TableField;
  5 +import com.baomidou.mybatisplus.annotation.TableId;
  6 +import com.baomidou.mybatisplus.annotation.TableName;
  7 +import io.swagger.annotations.ApiModel;
  8 +import lombok.Data;
  9 +import java.io.Serializable;
  10 +
  11 +/**
  12 + * 【请填写功能名称】表 camera
  13 + *
  14 + * @author huaheng
  15 + * @date 2022-05-23
  16 + */
  17 +@ApiModel(value="com.huaheng.pc.config.camera.domain.Camera")
  18 +@Data
  19 +@TableName(value = "camera")
  20 +public class Camera implements Serializable{
  21 + private static final long serialVersionUID = 1L;
  22 +
  23 + /** id */
  24 + @TableId(value = "id", type = IdType.AUTO)
  25 + private Integer id;
  26 + /** 仓库编码 */
  27 + @TableField(value = "warehouseCode")
  28 + private String warehouseCode;
  29 + /** 货主编码 */
  30 + @TableField(value = "companyCode")
  31 + private String companyCode;
  32 + /** ip */
  33 + @TableField(value = "ip")
  34 + private String ip;
  35 + /** 端口 */
  36 + @TableField(value = "port")
  37 + private String port;
  38 + /** 登录名称 */
  39 + @TableField(value = "userName")
  40 + private String userName;
  41 + /** 密码 */
  42 + @TableField(value = "password")
  43 + private String password;
  44 + /** 使用标识 */
  45 + @TableField(value = "useKey")
  46 + private String useKey;
  47 + /** 是否可用 */
  48 + @TableField(value = "isEnable")
  49 + private Integer isEnable;
  50 + /** 状态 */
  51 + @TableField(value = "isLocked")
  52 + private Integer isLocked;
  53 + /** 状态 */
  54 + @TableField(value = "bindName")
  55 + private String bindName;
  56 +
  57 +}
... ...
src/main/java/com/huaheng/pc/config/camera/mapper/CameraMapper.java 0 → 100644
  1 +package com.huaheng.pc.config.camera.mapper;
  2 +
  3 +import com.huaheng.pc.config.camera.domain.Camera;
  4 +import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  5 +import org.springframework.stereotype.Service;
  6 +
  7 +/**
  8 + * 【请填写功能名称】 数据层
  9 + *
  10 + * @author huaheng
  11 + * @date 2022-05-23
  12 + */
  13 +@Service
  14 +public interface CameraMapper extends BaseMapper<Camera> {
  15 +
  16 +}
  17 +
... ...
src/main/java/com/huaheng/pc/config/camera/service/ICameraService.java 0 → 100644
  1 +package com.huaheng.pc.config.camera.service;
  2 +
  3 +import com.huaheng.pc.config.camera.domain.Camera;
  4 +import com.baomidou.mybatisplus.extension.service.IService;
  5 +
  6 +/**
  7 + * 【请填写功能名称】 服务层
  8 + *
  9 + * @author huaheng
  10 + * @date 2022-05-23
  11 + */
  12 +public interface ICameraService extends IService<Camera> {
  13 +
  14 +}
  15 +
  16 +
... ...
src/main/java/com/huaheng/pc/config/camera/service/impl/CameraServiceImpl.java 0 → 100644
  1 +package com.huaheng.pc.config.camera.service.impl;
  2 +
  3 +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  4 +import com.huaheng.pc.config.camera.domain.Camera;
  5 +import com.huaheng.pc.config.camera.mapper.CameraMapper;
  6 +import com.huaheng.pc.config.camera.service.ICameraService;
  7 +import org.springframework.stereotype.Service;
  8 +
  9 +import javax.annotation.Resource;
  10 +
  11 +
  12 +/**
  13 + * 【请填写功能名称】 服务层实现
  14 + *
  15 + * @author huaheng
  16 + * @date 2022-05-23
  17 + */
  18 +@Service
  19 +public class CameraServiceImpl extends ServiceImpl<CameraMapper, Camera> implements ICameraService {
  20 +
  21 +}
... ...
src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
... ... @@ -320,17 +320,17 @@ public class InventoryHeaderController extends BaseController
320 320 }
321 321 /**
322 322 * 合托保存
323   - * @param destContainerCode 原容器
324   - * @param destContainerCode 目的容器
325   - * detailIdList ,原容器下面的库存详情id
  323 + * @param orgLocationCode 原库位
  324 + * @param destLocationCode 目的库位
  325 + * detailIdList ,原库位下面的库存详情id
326 326 * @return
327 327 */
328 328 @Log(title = "入库-入库单 ",operating = "修改入库单 ", action = BusinessType.UPDATE)
329 329 @PostMapping("/conformContainerSave")
330 330 @ResponseBody
331   - public AjaxResult conformContainerSave(String orgContainerCode, String destContainerCode, String detailIdList)
  331 + public AjaxResult conformContainerSave(String orgLocationCode, String destLocationCode, String detailIdList)
332 332 {
333   - return inventoryHeaderService.conformContainerSave(orgContainerCode, destContainerCode,detailIdList);
  333 + return inventoryHeaderService.conformContainerSave(orgLocationCode, destLocationCode,detailIdList);
334 334 }
335 335  
336 336  
... ...
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderService.java
... ... @@ -67,7 +67,7 @@ public interface InventoryHeaderService extends IService&lt;InventoryHeader&gt; {
67 67  
68 68 List<Integer> cycleCountInventoryHeader();
69 69  
70   - AjaxResult conformContainerSave(String orgContainerCode, String destContainerCode, String detailIdList);
  70 + AjaxResult conformContainerSave(String orgLocationCode, String destLocationCode, String detailIdList);
71 71  
72 72 }
73 73  
... ...
src/main/java/com/huaheng/pc/inventory/inventoryHeader/service/InventoryHeaderServiceImpl.java
... ... @@ -447,27 +447,30 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
447 447 /**
448 448 * 合托,将原容器物料移到目的容器,可以整个容器全部移到目的容器,也可以其中一分部移动
449 449 * 记录库存交易,判断明细不能是锁定状态(详情表锁状态没用到,暂时没判断)
450   - * @param orgContainerCode 原容器
451   - * @param destContainerCode 目的容器
  450 + * @param orgLocationCode 原容器
  451 + * @param destLocationCode 目的容器
452 452 * @param detailIdList 库存详情id
453 453 * @return
454 454 */
455 455 @Override
456 456 @Transactional(rollbackFor = Exception.class)
457   - public AjaxResult conformContainerSave(String orgContainerCode, String destContainerCode, String detailIdList) {
458   - if(StringUtils.isEmpty(orgContainerCode)||StringUtils.isEmpty(destContainerCode)){
459   - return AjaxResult.error("原容器,目的容器不能为空");
  457 + public AjaxResult conformContainerSave(String orgLocationCode, String destLocationCode, String detailIdList) {
  458 + if(StringUtils.isEmpty(orgLocationCode)||StringUtils.isEmpty(destLocationCode)){
  459 + return AjaxResult.error("原库位,目的库位不能为空");
460 460 }
461 461 // 判断原容器、目的容器是否存在库存里
462   - InventoryHeader inventoryHeader=checkContainer(orgContainerCode);
463   - InventoryHeader inventoryHeader1=checkContainer(destContainerCode);
  462 + InventoryHeader inventoryHeader=checkContainer(orgLocationCode);
  463 + InventoryHeader inventoryHeader1=checkContainer(destLocationCode);
464 464 if(inventoryHeader==null){
465   - return AjaxResult.error("原容器不存在库存");
  465 + return AjaxResult.error("原库位不存在库存");
466 466 }
467 467 if(inventoryHeader1==null){
468   - return AjaxResult.error("目的容器不存在库存");
  468 + return AjaxResult.error("目的库位不存在库存");
  469 + }
  470 + if(inventoryHeader.getId().equals(inventoryHeader1.getId())){
  471 + return AjaxResult.error("目的库位库存不能和原库位库存同一个");
469 472 }
470   - List<InventoryDetail> list=getDetailByContainerCode(orgContainerCode);
  473 + List<InventoryDetail> list=getDetailByContainerCode(orgLocationCode);
471 474 if(null==list||list.size()==0){
472 475 return AjaxResult.error("原容器不存在库存");
473 476 }
... ... @@ -483,7 +486,7 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
483 486 for(int a=0;a<str.length;a++){
484 487 Integer detailid=Integer.valueOf(str[a]);
485 488 if(detail.getId().equals(detailid)){
486   - saveInvDetail(detail,destContainerCode,inventoryHeader1);
  489 + saveInvDetail(detail,destLocationCode,inventoryHeader1);
487 490 }
488 491 }
489 492 }
... ... @@ -492,20 +495,20 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
492 495 }
493 496 }else{
494 497 for (InventoryDetail detail:list){
495   - saveInvDetail(detail,destContainerCode,inventoryHeader1);
  498 + saveInvDetail(detail,destLocationCode,inventoryHeader1);
496 499 }
497 500 }
498 501 //修改库存主表
499   - updateInventoryHeader(orgContainerCode);
500   - updateInventoryHeader(destContainerCode);
  502 + updateInventoryHeader(orgLocationCode);
  503 + updateInventoryHeader(destLocationCode);
501 504 return AjaxResult.success();
502 505 }
503 506 //保存库存交易表,修改库存详情
504   - public void saveInvDetail(InventoryDetail detail,String destContainerCode,InventoryHeader inventoryHeader1){
  507 + public void saveInvDetail(InventoryDetail detail,String destLocationCode,InventoryHeader inventoryHeader1){
505 508 //保存库存交易
506 509 saveInventoryTransaction(detail,true);
507   - detail.setContainerCode(destContainerCode);
508   - detail.setLocationCode(inventoryHeader1.getLocationCode());
  510 + detail.setLocationCode(destLocationCode);
  511 + detail.setContainerCode(inventoryHeader1.getContainerCode());
509 512 detail.setInventoryHeaderId(inventoryHeader1.getId());
510 513 detail.setLastUpdated(new Date());
511 514 detail.setLastUpdatedBy(ShiroUtils.getLoginName());
... ... @@ -514,27 +517,27 @@ public class InventoryHeaderServiceImpl extends ServiceImpl&lt;InventoryHeaderMappe
514 517 saveInventoryTransaction(detail,false);
515 518 }
516 519 //根据容器检查库存主表是否有数量
517   - public InventoryHeader checkContainer(String orgContainerCode){
  520 + public InventoryHeader checkContainer(String orgLocationCode){
518 521 boolean result=false;
519 522 LambdaQueryWrapper<InventoryHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
520   - lambdaQueryWrapper.eq(InventoryHeader::getContainerCode, orgContainerCode);
  523 + lambdaQueryWrapper.eq(InventoryHeader::getLocationCode, orgLocationCode);
521 524 lambdaQueryWrapper.gt(InventoryHeader::getTotalQty,0);
522 525 InventoryHeader inventoryHeader=this.getOne(lambdaQueryWrapper);
523 526 return inventoryHeader;
524 527 }
525 528 //根据容器查询库存详情列表
526   - public List<InventoryDetail> getDetailByContainerCode(String orgContainerCode){
  529 + public List<InventoryDetail> getDetailByContainerCode(String orgLocationCode){
527 530 LambdaQueryWrapper<InventoryDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
528   - lambdaQueryWrapper.eq(InventoryDetail::getContainerCode, orgContainerCode);
  531 + lambdaQueryWrapper.eq(InventoryDetail::getLocationCode, orgLocationCode);
529 532 List<InventoryDetail> list=inventoryDetailService.list(lambdaQueryWrapper);
530 533 return list;
531 534 }
532 535 //根据容器修改库存主表
533   - public void updateInventoryHeader(String orgContainerCode){
534   - List<InventoryDetail> list=getDetailByContainerCode(orgContainerCode);
  536 + public void updateInventoryHeader(String orgLocationCode){
  537 + List<InventoryDetail> list=getDetailByContainerCode(orgLocationCode);
535 538 int qty=0;
536 539 LambdaQueryWrapper<InventoryHeader> lambdaQueryWrapper = Wrappers.lambdaQuery();
537   - lambdaQueryWrapper.eq(InventoryHeader::getContainerCode, orgContainerCode);
  540 + lambdaQueryWrapper.eq(InventoryHeader::getLocationCode, orgLocationCode);
538 541 InventoryHeader inventoryHeader=this.getOne(lambdaQueryWrapper);
539 542 if(list==null||list.size()==0){
540 543 this.removeById(inventoryHeader);
... ...
src/main/java/com/huaheng/pc/monitor/job/task/RyTask.java
... ... @@ -23,6 +23,9 @@ import com.huaheng.pc.barcode.barcodeDetail.service.BarCodeDetailService;
23 23 import com.huaheng.pc.barcode.barcodeHeader.domain.BarCodeHeader;
24 24 import com.huaheng.pc.barcode.barcodeHeader.service.BarCodeHeaderService;
25 25 import com.huaheng.pc.config.address.service.AddressService;
  26 +import com.huaheng.pc.config.camera.domain.Camera;
  27 +import com.huaheng.pc.config.camera.service.ICameraService;
  28 +import com.huaheng.pc.config.camera.service.impl.CameraServiceImpl;
26 29 import com.huaheng.pc.config.company.service.CompanyService;
27 30 import com.huaheng.pc.config.container.service.ContainerService;
28 31 import com.huaheng.pc.config.location.domain.Location;
... ... @@ -97,16 +100,10 @@ public class RyTask extends BaseController {
97 100 @Resource
98 101 private TaskHeaderService taskHeaderService;
99 102 @Resource
100   - private ContainerService containerService;
101   - @Resource
102 103 private LocationService locationService;
103 104 @Resource
104 105 private WcsscanbarcodeService wcsscanbarcodeService;
105 106 @Resource
106   - private CompanyService companyService;
107   - @Resource
108   - private IUserService userService;
109   - @Resource
110 107 private IApiLogService apiLogService;
111 108 @Resource
112 109 private ZoneService zoneService;
... ... @@ -131,15 +128,13 @@ public class RyTask extends BaseController {
131 128 @Resource
132 129 private TaskDetailService taskDetailService;
133 130 @Resource
134   - private ReceiptContainerDetailService receiptContainerDetailService;
135   - @Resource
136 131 private ReceiptDetailService receiptDetailService;
137 132 @Resource
138   - private ShipmentContainerDetailService shipmentContainerDetailService;
139   - @Resource
140 133 private BarCodeHeaderService barCodeHeaderService;
141 134 @Resource
142 135 private BarCodeDetailService barCodeDetailService;
  136 + @Resource
  137 + private ICameraService cameraService;
143 138  
144 139 public static String camera1 = null;
145 140 public static String camera2 = null;
... ... @@ -542,18 +537,33 @@ public class RyTask extends BaseController {
542 537 public AjaxResult loginCamera() {
543 538 boolean flag= true;
544 539 String msg = "成功";
545   - if (StringUtils.isNull(RyTask.camera1) || StringUtils.isNull(RyTask.camera2)) {
546   - LoginModule.init(disConnect, haveReConnect);
547   - RyTask.camera1 = LoginModule.login("10.34.101.55", 37777, "admin", "hk999999");
548   - if(camera1 == null){
549   - return AjaxResult.toAjax(false).setData(ToolKits.getErrorCodePrint());
550   - }
551   - RyTask.camera2 = LoginModule.login("10.34.101.59", 37777, "admin", "hk999999");
552   - if(camera2 == null){
553   - return AjaxResult.toAjax(false).setData(ToolKits.getErrorCodePrint());
554   - }
555   - CapturePictureModule.setSnapRevCallBack(RyTask.m_CaptureReceiveCB);
  540 + LambdaQueryWrapper<Camera> queryWrapper = Wrappers.lambdaQuery();
  541 + queryWrapper.eq(Camera::getUseKey,"camera1");
  542 + Camera c1 = cameraService.getOne(queryWrapper);
  543 + String ip1 = c1.getIp();
  544 + String port1 = c1.getPort();
  545 + String userName1 = c1.getUserName();
  546 + String password1 = c1.getPassword();
  547 +
  548 + LambdaQueryWrapper<Camera> queryWrapper2 = Wrappers.lambdaQuery();
  549 + queryWrapper2.eq(Camera::getUseKey,"camera2");
  550 + Camera c2 = cameraService.getOne(queryWrapper);
  551 + String ip2 = c2.getIp();
  552 + String port2 = c2.getPort();
  553 + String userName2 = c2.getUserName();
  554 + String password2 = c2.getPassword();
  555 +
  556 + LoginModule.init(disConnect, haveReConnect);
  557 +
  558 + RyTask.camera1 = LoginModule.login(ip1, Integer.valueOf(port1), userName1, password1);
  559 + if(RyTask.camera1 == null){
  560 + return AjaxResult.toAjax(false).setData(ToolKits.getErrorCodePrint());
  561 + }
  562 + RyTask.camera2 = LoginModule.login(ip2, Integer.valueOf(port2), userName2, password2);
  563 + if(camera2 == null){
  564 + return AjaxResult.toAjax(false).setData(ToolKits.getErrorCodePrint());
556 565 }
  566 + CapturePictureModule.setSnapRevCallBack(RyTask.m_CaptureReceiveCB);
557 567 return AjaxResult.success();
558 568 }
559 569  
... ...
src/main/resources/mybatis/config/CameraMapper.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8" ?>
  2 +<!DOCTYPE mapper
  3 +PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4 +"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5 +<mapper namespace="com.huaheng.pc.config.camera.mapper.CameraMapper">
  6 +
  7 + <resultMap type="com.huaheng.pc.config.camera.domain.Camera" id="cameraResult">
  8 + <result property="id" column="id" />
  9 + <result property="warehouseCode" column="warehouseCode" />
  10 + <result property="companyCode" column="companyCode" />
  11 + <result property="ip" column="ip" />
  12 + <result property="port" column="port" />
  13 + <result property="userName" column="userName" />
  14 + <result property="password" column="password" />
  15 + <result property="useKey" column="useKey" />
  16 + <result property="isEnable" column="isEnable" />
  17 + <result property="isLocked" column="isLocked" />
  18 + <result property="bindName" column="bindName" />
  19 + </resultMap>
  20 + <sql id="selectCameraVo">
  21 + select id, warehouseCode, companyCode, ip, port, userName, password, useKey, isEnable, isLocked,bindName from camera
  22 + </sql>
  23 +
  24 +</mapper>
0 25 \ No newline at end of file
... ...
src/main/resources/templates/config/camera/add.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org">
  3 +<meta charset="utf-8">
  4 +<head>
  5 + <th:block th:include="include :: header"/>
  6 + </head>
  7 +<body class="white-bg">
  8 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  9 + <form class="form-horizontal m" id="form-camera-add">
  10 + <div class="form-group">
  11 + <label class="col-sm-3 control-label">ip
  12 + :</label>
  13 + <div class="col-sm-8">
  14 + <input id="ip" name="ip" class="form-control" type="text">
  15 + </div>
  16 + </div>
  17 + <div class="form-group">
  18 + <label class="col-sm-3 control-label">端口
  19 + :</label>
  20 + <div class="col-sm-8">
  21 + <input id="port" name="port" class="form-control" type="text">
  22 + </div>
  23 + </div>
  24 + <div class="form-group">
  25 + <label class="col-sm-3 control-label">登录名称
  26 + :</label>
  27 + <div class="col-sm-8">
  28 + <input id="userName" name="userName" class="form-control" type="text">
  29 + </div>
  30 + </div>
  31 + <div class="form-group">
  32 + <label class="col-sm-3 control-label">密码 :</label>
  33 + <div class="col-sm-8">
  34 + <input id="password" name="password" class="form-control" type="text">
  35 + </div>
  36 + </div>
  37 + <div class="form-group">
  38 + <div class="form-control-static col-sm-offset-9">
  39 + <button type="submit" class="btn btn-primary">提交</button>
  40 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  41 + </div>
  42 + </div>
  43 + </form>
  44 +</div>
  45 +<th:block th:include="include :: footer"/>
  46 +<script type="text/javascript">
  47 + var prefix = ctx + "config/camera"
  48 + function submitHandler() {
  49 + if ($.validate.form()) {
  50 + $.operate.save(prefix + "/add", $('#form-camera-add').serialize());
  51 + }
  52 + }
  53 + $("#form-camera-add").validate({
  54 + rules:{
  55 + ip:{
  56 + required:true,
  57 + },
  58 + port:{
  59 + required:true,
  60 + },
  61 + userName:{
  62 + required:true,
  63 + },
  64 + password:{
  65 + required:true,
  66 + },
  67 + },
  68 + submitHandler: function(form) {
  69 + $.ajax({
  70 + cache : true,
  71 + type : "POST",
  72 + url : ctx + "config/camera/add",
  73 + data : $('#form-camera-add').serialize(),
  74 + async : false,
  75 + error : function(request) {
  76 + $.modal.alertError("请求失败!");
  77 + },
  78 + success : function(result) {
  79 + setTimeout(function () {
  80 + // 因为使用layui弹出 所以需要引用
  81 + var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  82 + //
  83 + parent.loadDetail();
  84 + parent.layer.close(index); //再执行关闭
  85 + }, 1000);
  86 + }
  87 + });
  88 + }
  89 + });
  90 + </script>
  91 +</body>
  92 +</html>
... ...
src/main/resources/templates/config/camera/bindCamera.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-camera-bindCamera">
  8 + <input id="id" name="id" type="hidden" th:value="${camera.id}" />
  9 + <div class="form-group">
  10 + <label class="col-sm-3 control-label ">摄像头IP:</label>
  11 + <div class="col-sm-8">
  12 + <input class="form-control" type="text" readonly="true" id="ip" name="ip" th:value="${camera.ip}"/>
  13 + </div>
  14 + </div>
  15 + <div class="form-group">
  16 + <label class="col-sm-3 control-label">选择摄像头:</label>
  17 + <div class="col-sm-8">
  18 + <select id="useKey" name="useKey" class="form-control" th:with="firstStatus=${@dict.getType('cameraIp')}">
  19 + <option value="">请选择</option>
  20 + <option th:each="item : ${firstStatus}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}" th:attr = " code = ${item['dictValue']}"></option>
  21 + </select>
  22 +
  23 + </div>
  24 + </div>
  25 + <div class="form-group">
  26 + <div class="form-control-static col-sm-offset-9">
  27 + <button type="submit" class="btn btn-primary">提交</button>
  28 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  29 + </div>
  30 + </div>
  31 + </form>
  32 +</div>
  33 +<div th:include="include :: footer"></div>
  34 +<script type="text/javascript">
  35 + $("#form-camera-bindCamera").validate({
  36 + submitHandler:function(form){
  37 + let url = ctx + "config/camera/bindUpdate";
  38 + let useKey = $("#useKey").val();
  39 + if(useKey==''){
  40 + $.modal.alertWarning("选择绑定摄像头后在提交!!!");
  41 + return false;
  42 + }
  43 + let data = {
  44 + "id":$("#id").val(),
  45 + "ip":$("#ip").val(),
  46 + "useKey":$("#useKey option:selected").val(),
  47 + "bindName":$("select[name='useKey']").find("option:selected").text(),
  48 + }
  49 + var config = {
  50 + url: url,
  51 + type: "post",
  52 + dataType: "json",
  53 + data: data,
  54 + success: function (result) {
  55 + if(result.code==web_status.SUCCESS){
  56 + layer.alert(result.msg, { icon: 1, closeBtn: 0 }, function () {
  57 + var index = parent.layer.getFrameIndex(window.name);
  58 + layer.close(index);
  59 + parent.location.reload();
  60 + parent.layer.close(index); //再执行关闭
  61 + })
  62 + }else{
  63 + layer.alert(result.msg, { icon: 2, closeBtn: 0 }, function () {
  64 + var index = parent.layer.getFrameIndex(window.name);
  65 + layer.close(index);
  66 + parent.location.reload();
  67 + parent.layer.close(index); //再执行关闭
  68 + })
  69 + }
  70 +
  71 + }
  72 + };
  73 + $.ajax(config)
  74 + }
  75 + });
  76 +</script>
  77 +</body>
  78 +
  79 +</html>
... ...
src/main/resources/templates/config/camera/camera.html 0 → 100644
  1 +<!DOCTYPE HTML>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="gray-bg">
  6 + <div class="container-div">
  7 + <div class="row">
  8 + <div class="col-sm-12 select-info">
  9 + <form id="formId">
  10 + <div class="select-list">
  11 + <ul>
  12 + <li>
  13 + <label>ip:</label>
  14 + <input type="text" name="ip"/>
  15 + </li>
  16 + <li>
  17 + <label>端口:</label>
  18 + <input type="text" name="port"/>
  19 + </li>
  20 + <li>
  21 + <label>登录名称:</label>
  22 + <input type="text" name="userName"/>
  23 + </li>
  24 + <li>
  25 + <label>使用标识:</label>
  26 + <input type="text" name="useKey" value=""/>
  27 + </li>
  28 + <li>
  29 + <label>是否可用:</label>
  30 + <input type="text" name="isEnable"/>
  31 + </li>
  32 + <li>
  33 + <label>状态:</label>
  34 + <input type="text" name="isLocked"/>
  35 + </li>
  36 + <li>
  37 + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  38 + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  39 + </li>
  40 + </ul>
  41 + </div>
  42 + </form>
  43 + <div class="btn-group hidden-xs" id="toolbar" role="group">
  44 + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()">
  45 + <i class="fa fa-plus"></i> 新增
  46 + </a>
  47 + <a class="btn btn-outline btn-primary single disabled" onclick="$.operate.edit()">
  48 + <i class="fa fa-edit"></i> 修改
  49 + </a>
  50 + <a class="btn btn-outline btn-danger btn-rounded multiple disabled" onclick="$.operate.batRemove()" >
  51 + <i class="fa fa-trash-o"></i> 删除
  52 + </a>
  53 + </div>
  54 + <div class="col-sm-12 select-info table-striped tab-pane">
  55 + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover text-nowrap"></table>
  56 + </div>
  57 + </div>
  58 +
  59 + </div>
  60 + </div>
  61 + <div th:include="include :: footer"></div>
  62 + <script th:inline="javascript">
  63 + var editFlag = [[${@permission.hasPermi('config:camera:edit')}]];
  64 + var removeFlag = [[${@permission.hasPermi('config:camera:remove')}]];
  65 + var prefix = ctx + "config/camera"
  66 +
  67 + function initFrame() {
  68 + $.ajax({
  69 + url:ctx + 'config/camera/list',
  70 + type:"post",
  71 + success:function (value) {
  72 + $('#bootstrap-table').bootstrapTable({
  73 + toolbar:"#toolbar",
  74 + data:value.data,
  75 + columns: value.total,
  76 + });
  77 + }
  78 + });
  79 + }
  80 + /*用户管理-重置密码*/
  81 + function resetPwd(id) {
  82 + var url = prefix + '/cameraReset/' + id;
  83 + $.modal.open("重置密码", url, '800', '300');
  84 + }
  85 +
  86 + /*用户管理-重置密码*/
  87 + function bindCamera(id) {
  88 + var url = prefix + '/bindCamera/' + id;
  89 + $.modal.open("绑定摄像头", url, '800', '300');
  90 + }
  91 +
  92 + function unBind(id) {
  93 + var url = prefix + '/unBind/' + id;
  94 + var config = {
  95 + url: url,
  96 + type: "post",
  97 + dataType: "json",
  98 + success: function (result) {
  99 + layer.alert(result.msg, { icon: 1, closeBtn: 0 }, function () {
  100 + location.reload();
  101 + })
  102 + }
  103 + };
  104 + $.ajax(config);
  105 + }
  106 +
  107 + $(function() {
  108 + var options = {
  109 + url: prefix + "/list",
  110 + createUrl: prefix + "/add",
  111 + updateUrl: prefix + "/edit/{id}",
  112 + removeUrl: prefix + "/remove",
  113 + modalName: "【请填写功能名称】",
  114 + columns: [{
  115 + checkbox: true
  116 + },
  117 + {
  118 + field: 'id',
  119 + title: 'id',
  120 + visible: true
  121 + },
  122 + {
  123 + field: 'warehouseCode',
  124 + title: '仓库编码',
  125 + visible: false
  126 + },
  127 + {
  128 + field: 'companyCode',
  129 + title: '货主编码',
  130 + visible: false
  131 + },
  132 + {
  133 + field: 'ip',
  134 + title: 'ip',
  135 + align: 'center',
  136 + },
  137 + {
  138 + field: 'port',
  139 + title: '端口',
  140 + align: 'center',
  141 + },
  142 + {
  143 + field: 'userName',
  144 + title: '登录名称',
  145 + align: 'center',
  146 + },
  147 + {
  148 + field: 'password',
  149 + title: '密码',
  150 + visible: false
  151 + },
  152 + {
  153 + field: 'useKey',
  154 + title: '使用标识',
  155 + visible: false
  156 + },
  157 + {
  158 + field: 'isEnable',
  159 + title: '状态',
  160 + align: 'center',
  161 + formatter: function(value, row, index) {
  162 + if(value!=undefined){
  163 + if(value==0){
  164 + return '<span class="badge badge-info">空闲</span>'
  165 + }else if(value==1){
  166 + return '<span class="badge badge-danger">使用中</span>'
  167 + }
  168 + }
  169 + return '';
  170 + }
  171 + },
  172 + {
  173 + field: 'bindName',
  174 + title: '绑定名称',
  175 + align: 'center',
  176 + },
  177 + {
  178 + field: 'isLocked',
  179 + title: '锁定',
  180 + align: 'center',
  181 + formatter: function(value, row, index) {
  182 + if(value!=undefined){
  183 + if(value==0){
  184 + return '<span class="badge badge-info">正常</span>'
  185 + }else if(value==1){
  186 + return '<span class="badge badge-danger">锁定</span>'
  187 + }
  188 + }
  189 + return '';
  190 + }
  191 + },
  192 + {
  193 + title: '操作',
  194 + align: 'center',
  195 + formatter: function(value, row, index) {
  196 + var actions = [];
  197 + // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  198 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>');
  199 + actions.push('<a class="btn btn-info btn-xs ' + removeFlag + '" href="#" onclick="resetPwd(\'' + row.id + '\')"><i class="fa fa-key"></i>修改密码</a>');
  200 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="bindCamera(\'' + row.id + '\')"><i class="fa fa-lock"></i>绑定摄像头</a>');
  201 + if (row.useKey != undefined && row.useKey != '' ){
  202 + actions.push('<a class="btn btn-primary btn-xs ' + removeFlag + '" href="#" onclick="unBind(\'' + row.id + '\')"><i class="fa fa-unlock"></i>解绑</a>');
  203 + }
  204 + return actions.join('');
  205 + }
  206 + }]
  207 + };
  208 + $.table.init(options);
  209 + });
  210 + </script>
  211 +</body>
  212 +</html>
0 213 \ No newline at end of file
... ...
src/main/resources/templates/config/camera/cameraReset.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3 +<meta charset="utf-8">
  4 +<head th:include="include :: header"></head>
  5 +<body class="white-bg">
  6 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  7 + <form class="form-horizontal m" id="form-camera-cameraReset">
  8 + <input name="id" type="hidden" th:value="${camera.id}" />
  9 + <div class="form-group">
  10 + <label class="col-sm-3 control-label ">摄像头IP:</label>
  11 + <div class="col-sm-8">
  12 + <input class="form-control" type="text" readonly="true" name="ip" th:value="${camera.ip}"/>
  13 + </div>
  14 + </div>
  15 + <div class="form-group">
  16 + <label class="col-sm-3 control-label">输入密码:</label>
  17 + <div class="col-sm-8">
  18 + <input class="form-control" type="password" name="password" id="password" value="123456">
  19 + </div>
  20 + </div>
  21 + <div class="form-group">
  22 + <div class="form-control-static col-sm-offset-9">
  23 + <button type="submit" class="btn btn-primary">提交</button>
  24 + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button>
  25 + </div>
  26 + </div>
  27 + </form>
  28 +</div>
  29 +<div th:include="include :: footer"></div>
  30 +<script type="text/javascript">
  31 + $("#form-camera-cameraReset").validate({
  32 + rules:{
  33 + password:{
  34 + required:true,
  35 + minlength: 5,
  36 + maxlength: 20
  37 + },
  38 + },
  39 + submitHandler:function(form){
  40 + let url = ctx + "config/camera/cameraReset";
  41 + let data = $('#form-camera-cameraReset').serialize();
  42 + $.modal.loading("正在处理中,请稍后...");
  43 + var config = {
  44 + url: url,
  45 + type: "post",
  46 + dataType: "json",
  47 + data: data,
  48 + success: function (result) {
  49 + layer.alert(result.msg, { icon: 1, closeBtn: 0 }, function () {
  50 + var index = parent.layer.getFrameIndex(window.name);
  51 + layer.close(index);
  52 + parent.layer.close(index); //再执行关闭
  53 + })
  54 + }
  55 + };
  56 + $.ajax(config)
  57 + }
  58 +
  59 + });
  60 +</script>
  61 +</body>
  62 +
  63 +</html>
... ...
src/main/resources/templates/config/camera/edit.html 0 → 100644
  1 +<!DOCTYPE html>
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3 +<head>
  4 + <th:block th:include="include :: header" />
  5 + </head>
  6 +<body class="white-bg">
  7 +<div class="wrapper wrapper-content animated fadeInRight ibox-content">
  8 + <form class="form-horizontal m" id="form-camera-edit" th:object="${camera}">
  9 + <input name="id" th:field="*{id}" type="hidden">
  10 + <input name="warehouseCode" th:field="*{warehouseCode}" class="form-control" type="hidden">
  11 + <input name="companyCode" th:field="*{companyCode}" class="form-control" type="hidden">
  12 + <div class="form-group">
  13 + <label class="col-sm-3 control-label">ip:</label>
  14 + <div class="col-sm-8">
  15 + <input name="ip" th:field="*{ip}" class="form-control" type="text">
  16 + </div>
  17 + </div>
  18 + <div class="form-group">
  19 + <label class="col-sm-3 control-label">端口:</label>
  20 + <div class="col-sm-8">
  21 + <input name="port" th:field="*{port}" class="form-control" type="text">
  22 + </div>
  23 + </div>
  24 + <div class="form-group">
  25 + <label class="col-sm-3 control-label">登录名称:</label>
  26 + <div class="col-sm-8">
  27 + <input name="userName" th:field="*{userName}" class="form-control" type="text">
  28 + </div>
  29 + </div>
  30 + <div class="form-group">
  31 + <label class="col-sm-3 control-label">密码:</label>
  32 + <div class="col-sm-8">
  33 + <input name="password" th:field="*{password}" class="form-control" type="password">
  34 + </div>
  35 + </div>
  36 + <div class="form-group">
  37 + <label class="col-sm-3 control-label">使用标识:</label>
  38 + <div class="col-sm-8">
  39 + <input name="useKey" th:field="*{useKey}" class="form-control" type="text">
  40 + </div>
  41 + </div>
  42 + <div class="form-group">
  43 + <label class="col-sm-3 control-label">是否可用:</label>
  44 + <div class="col-sm-8">
  45 + <input name="isEnable" th:field="*{isEnable}" class="form-control" type="text">
  46 + </div>
  47 + </div>
  48 + <div class="form-group">
  49 + <label class="col-sm-3 control-label">状态:</label>
  50 + <div class="col-sm-8">
  51 + <input name="isLocked" th:field="*{isLocked}" class="form-control" type="text">
  52 + </div>
  53 + </div>
  54 + </form>
  55 +</div>
  56 +<th:block th:include="include :: footer" />
  57 +<script th:inline="javascript">
  58 + var prefix = ctx + "camera/camera";
  59 + $("#form-camera-edit").validate({
  60 + focusCleanup: true
  61 + });
  62 +
  63 + function submitHandler() {
  64 + if ($.validate.form()) {
  65 + $.operate.save(prefix + "/edit", $('#form-camera-edit').serialize());
  66 + }
  67 + }
  68 + </script>
  69 +</body>
  70 +</html>
0 71 \ No newline at end of file
... ...
src/main/resources/templates/inventory/inventoryHeader/conformContainer.html
... ... @@ -5,20 +5,22 @@
5 5 <body class="white-bg">
6 6 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7 7 <form class="form-horizontal m" id="form-task-emptyIn">
8   - <span style="color:red;margin-left:25%">*如果不勾选明细,则默认该容器明细全部转移到目的容器</span>
  8 + <span style="color:red;margin-left:25%">*如果不勾选明细,则默认该库位明细全部转移到目的容器</span>
9 9 <div class="form-group">
10   - <label class="col-sm-3 control-label">原容器编码:</label>
  10 + <label class="col-sm-3 control-label">原库位编码:</label>
11 11 <div class="col-sm-6">
12   - <input id="orgContainerCode" name="orgContainerCode" class="form-control" type="text" >
  12 + <input id="orgLocationCode" name="orgLocationCode" class="form-control" type="text" >
  13 + <!--<input id="orgContainerCode" name="orgContainerCode" class="form-control" type="text" >-->
13 14 </div>
14 15 <input type="hidden" id="detailIdList" name="detailIdList">
15 16 <button type="button" class="btn btn-primary" onclick="selectMaterial()">选取明细</button>
16 17 <button type="button" class="btn btn-primary" onclick="clearSelect()">清空明细</button>
17 18 </div>
18 19 <div class="form-group">
19   - <label class="col-sm-3 control-label">目的容器:</label>
  20 + <label class="col-sm-3 control-label">目的库位:</label>
20 21 <div class="col-sm-8">
21   - <input id="destContainerCode" name="destContainerCode" class="form-control" type="text" >
  22 + <input id="destLocationCode" name="destLocationCode" class="form-control" type="text">
  23 + <!--<input id="destContainerCode" name="destContainerCode" class="form-control" type="text">-->
22 24 </div>
23 25 </div>
24 26 <div class="col-sm-12 select-info" id="selecttable" >
... ... @@ -43,16 +45,16 @@
43 45 $("#detailIdList").val('');
44 46 }
45 47 function selectMaterial(){
46   - var orgContainerCode=$("#orgContainerCode").val();
47   - if(orgContainerCode==''||orgContainerCode==undefined){
48   - $.modal.alertError("请填写原容器编码");
  48 + var orgLocationCode=$("#orgLocationCode").val();
  49 + if(orgLocationCode==''||orgLocationCode==undefined){
  50 + $.modal.alertError("请填写原库位编码");
49 51 return;
50 52 }
51 53 $.ajax({
52 54 url:prefix + '/inventoryDetailLook',
53 55 type:"post",
54 56 data:{
55   - "containerCode":orgContainerCode,
  57 + "locationCode":orgLocationCode,
56 58 },
57 59 success:function (value) {
58 60 console.log(value)
... ... @@ -183,14 +185,14 @@
183 185 $("#form-task-emptyIn").validate({
184 186  
185 187 submitHandler: function(form) {
186   - var orgContainerCode=$("#orgContainerCode").val();
187   - var destContainerCode=$("#destContainerCode").val();
188   - if(orgContainerCode==''||destContainerCode==''){
189   - $.modal.alertError("请填写原容器编码和目的容器编号");
  188 + var orgLocationCode=$("#orgLocationCode").val();
  189 + var destLocationCode=$("#destLocationCode").val();
  190 + if(orgLocationCode==''||destLocationCode==''){
  191 + $.modal.alertError("请填写原库位编码和目的库位编号");
190 192 return;
191 193 }
192 194 let rows = $("#bootstrap-table").bootstrapTable('getSelections');
193   - console.log(rows);
  195 + //console.log(rows);
194 196 var ids = "";
195 197 for (var i = 0; i<rows.length; i++){
196 198 ids += rows[i].id;
... ... @@ -202,8 +204,8 @@
202 204 url:prefix_header + "/conformContainerSave",
203 205 type:"post",
204 206 data:{
205   - "orgContainerCode":orgContainerCode,
206   - "destContainerCode":destContainerCode,
  207 + "orgLocationCode":orgLocationCode,
  208 + "destLocationCode":destLocationCode,
207 209 "detailIdList":ids,
208 210 },
209 211 success:function (result) {
... ...