现场需求fix
This commit is contained in:
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Data;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.nl.acs.device.domain.Device;
|
||||
import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.device_driver.DeviceDriver;
|
||||
@@ -301,8 +302,10 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
||||
this.apply(7);
|
||||
break;
|
||||
case 8:
|
||||
if(ObjectUtils.isNotEmpty(sub_tray)&&ObjectUtils.isNotEmpty(mother_tray)) {
|
||||
log.info("满料出库");
|
||||
this.apply(8);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,15 +11,21 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.common.utils.RsaUtils;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.common.utils.dto.CurrentUser;
|
||||
import org.nl.config.RsaProperties;
|
||||
import org.nl.system.service.role.ISysRoleService;
|
||||
import org.nl.system.service.role.dao.SysRole;
|
||||
import org.nl.system.service.secutiry.dto.AuthUserDto;
|
||||
import org.nl.system.service.user.ISysUserService;
|
||||
import org.nl.system.service.user.dao.SysUser;
|
||||
import org.nl.system.service.user.dao.mapper.SysUserMapper;
|
||||
import org.nl.system.service.user.dto.SysUserDetail;
|
||||
import org.nl.system.service.user.dto.UserQuery;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -49,7 +55,6 @@ public class MobileAuthorizationController {
|
||||
private ISysUserService userService;
|
||||
@Autowired
|
||||
private ISysRoleService roleService;
|
||||
|
||||
@ApiOperation("登录授权")
|
||||
@PostMapping(value = "/login")
|
||||
@SaIgnore
|
||||
@@ -63,9 +68,9 @@ public class MobileAuthorizationController {
|
||||
if (ObjectUtil.isEmpty(userInfo) || !userInfo.getPassword().equals(SaSecureUtil.md5BySalt(password, "salt"))) { // 这里需要密码加密
|
||||
throw new BadRequestException("账号或密码错误!");
|
||||
}
|
||||
|
||||
// 获取权限列表 - 登录查找权限
|
||||
List<String> permissionList = roleService.getPermissionList((JSONObject) JSON.toJSON(userInfo));
|
||||
|
||||
if (!userInfo.getIs_used()) {
|
||||
throw new BadRequestException("账号未激活");
|
||||
}
|
||||
@@ -83,14 +88,25 @@ public class MobileAuthorizationController {
|
||||
.setDevice("PE") // 此次登录的客户端设备类型, 用于[同端互斥登录]时指定此次登录的设备类型
|
||||
.setExtra("loginInfo", user) // Token挂载的扩展参数 (此方法只有在集成jwt插件时才会生效)
|
||||
);
|
||||
|
||||
UserQuery query=new UserQuery();
|
||||
query.setBlurry(user.getUsername());
|
||||
PageQuery page=new PageQuery();
|
||||
List<SysUserDetail> userDetail = userService.getUserDetail(query, page);
|
||||
String roles="";
|
||||
for(SysRole role:userDetail.get(0).getRoles()){
|
||||
if(ObjectUtil.isNotEmpty(role.getRemark())){
|
||||
roles+=role.getRemark()+',';
|
||||
}
|
||||
}
|
||||
// 返回 token 与 用户信息
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("roles", permissionList);
|
||||
jsonObject.put("user", userInfo);
|
||||
String finalRoles = roles;
|
||||
JSONObject authInfo = new JSONObject(2) {{
|
||||
put("token", "Bearer " + StpUtil.getTokenValue());
|
||||
put("user", jsonObject);
|
||||
put("roles", finalRoles);
|
||||
}};
|
||||
|
||||
return ResponseEntity.ok(authInfo);
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
</collection>
|
||||
<collection property="roles" ofType="org.nl.system.service.role.dao.SysRole">
|
||||
<id property="role_id" column="role_id"/>
|
||||
<id property="remark" column="remark"/>
|
||||
</collection>
|
||||
</resultMap>
|
||||
<select id="getUserDetail" resultMap="UserDetail">
|
||||
@@ -66,11 +67,13 @@
|
||||
,sys_dept.dept_id
|
||||
,sys_dept.name as dept_name
|
||||
,sys_users_roles.role_id
|
||||
,sys_role.remark
|
||||
FROM
|
||||
sys_user
|
||||
left join sys_user_dept on sys_user.user_id = sys_user_dept.user_id
|
||||
left join sys_users_roles on sys_users_roles.user_id = sys_user.user_id
|
||||
left join sys_dept on sys_user_dept.dept_id = sys_dept.dept_id
|
||||
left join sys_role on sys_users_roles.role_id = sys_role.create_id
|
||||
<where>
|
||||
<if test="query.dept_id != null">
|
||||
and
|
||||
|
||||
@@ -6,4 +6,6 @@ import lombok.Data;
|
||||
public class WuliaoDto {
|
||||
String name;
|
||||
String number;
|
||||
|
||||
String percentage;
|
||||
}
|
||||
|
||||
@@ -121,10 +121,17 @@
|
||||
|
||||
|
||||
<select id="wuliao" resultType="org.nl.wms.board.service.dao.dto.WuliaoDto">
|
||||
select productDescription as name,count(*) as number
|
||||
from sch_base_material
|
||||
GROUP BY productDescription
|
||||
limit 5
|
||||
SELECT
|
||||
a.NAME,
|
||||
a.number,
|
||||
FLOOR( a.number / b.sum * 100 ) AS percentage
|
||||
FROM
|
||||
( SELECT productDescription AS NAME, count(*) AS number FROM sch_base_material GROUP BY productDescription ) a,(
|
||||
SELECT
|
||||
count(*) AS sum
|
||||
FROM
|
||||
sch_base_material
|
||||
) b
|
||||
</select>
|
||||
|
||||
<select id="cz" resultType="org.nl.wms.board.service.dao.dto.CzDto">
|
||||
|
||||
@@ -65,9 +65,11 @@ public class MesController {
|
||||
qpmes060Response.setHEAD(head);
|
||||
try {
|
||||
Material material = new Material();
|
||||
material.copyFrom(notice.toJavaObject(QPMES060Request.class).getBODY().get(0));
|
||||
for(QPMES060RequestBody QPMES060RequestBody:notice.toJavaObject(QPMES060Request.class).getBODY()) {
|
||||
material.copyFrom(QPMES060RequestBody);
|
||||
material.setGroup_bind_material_status(GroupBindMaterialStatusEnum.BOUND.getValue());
|
||||
materialMapper.insert(material);
|
||||
}
|
||||
qpmes060ResponseBody.setMESSAGE("原材料入库成功");
|
||||
qpmes060ResponseBody.setSTATUS("S");
|
||||
qpmes060ResponseBodyArrayList.add(qpmes060ResponseBody);
|
||||
|
||||
@@ -54,6 +54,7 @@ public class PdaController {
|
||||
public ResponseEntity<Object> queryPoint(@RequestBody Map<String, String> whereJson) {
|
||||
SchBasePoint region = new SchBasePoint();
|
||||
region.setRegion_code(whereJson.get("region_code"));
|
||||
region.setPoint_code(whereJson.get("point_code"));
|
||||
return new ResponseEntity<>(pointService.getPointList(region), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<?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="org.nl.wms.sch.material.service.dao.mapper.MaterialMapper">
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.sch.point.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -7,6 +8,11 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.system.service.role.dao.SysRole;
|
||||
import org.nl.system.service.user.ISysUserService;
|
||||
import org.nl.system.service.user.dto.SysUserDetail;
|
||||
import org.nl.system.service.user.dto.UserQuery;
|
||||
import org.nl.wms.sch.point.service.ISchBasePointService;
|
||||
import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -15,6 +21,8 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
/**
|
||||
@@ -29,13 +37,26 @@ public class SchBasePointController {
|
||||
|
||||
@Autowired
|
||||
private ISchBasePointService schBasePointService;
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询点位管理")
|
||||
@ApiOperation("查询点位管理")
|
||||
//@SaCheckPermission("@el.check('schBasePoint:list')")
|
||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(schBasePointService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
String userName=SecurityUtils.getCurrentUsername();
|
||||
UserQuery query=new UserQuery();
|
||||
query.setBlurry(userName);
|
||||
PageQuery pageQuery=new PageQuery();
|
||||
List<SysUserDetail> userDetail = userService.getUserDetail(query, pageQuery);
|
||||
List<String> roles=new ArrayList();
|
||||
for(SysRole role:userDetail.get(0).getRoles()){
|
||||
if(ObjectUtil.isNotEmpty(role.getRemark())){
|
||||
roles.add(role.getRemark());
|
||||
}
|
||||
}
|
||||
return new ResponseEntity<>(TableDataInfo.build(schBasePointService.queryAll(whereJson,page,roles)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
|
||||
@@ -23,7 +23,7 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<SchBasePoint>
|
||||
*/
|
||||
IPage<SchBasePoint> queryAll(Map whereJson, PageQuery pageable);
|
||||
IPage<SchBasePoint> queryAll(Map whereJson, PageQuery pageable,List<String> roles);
|
||||
|
||||
/**
|
||||
* 创建
|
||||
|
||||
@@ -150,4 +150,9 @@ public class SchBasePoint implements Serializable {
|
||||
@ApiModelProperty(value = "放货等待点")
|
||||
private String next_wait_point;
|
||||
|
||||
// @ApiModelProperty(value = "物料名称")
|
||||
// private String product_description;
|
||||
//
|
||||
// @ApiModelProperty(value = "供应商名称")
|
||||
// private String supplier_name;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
private SchBaseRegionMapper regionMapper;
|
||||
|
||||
@Override
|
||||
public IPage<SchBasePoint> queryAll(Map whereJson, PageQuery page){
|
||||
public IPage<SchBasePoint> queryAll(Map whereJson, PageQuery page,List<String> roles){
|
||||
String blurry = ObjectUtil.isNotEmpty(whereJson.get("blurry")) ? whereJson.get("blurry").toString() : null;
|
||||
String workshop_code = ObjectUtil.isNotEmpty(whereJson.get("workshop_code")) ? whereJson.get("workshop_code").toString() : null;
|
||||
String region_code = ObjectUtil.isNotEmpty(whereJson.get("region_code")) ? whereJson.get("region_code").toString() : null;
|
||||
@@ -59,6 +59,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
lam.like(ObjectUtil.isNotEmpty(blurry), SchBasePoint::getPoint_code, blurry)
|
||||
// .or(ObjectUtil.isNotEmpty(blurry), lam1 -> lam1.like(SchBasePoint::getPoint_name, blurry))
|
||||
.eq(ObjectUtil.isNotEmpty(workshop_code), SchBasePoint::getWorkshop_code, workshop_code)
|
||||
.in(ObjectUtil.isNotEmpty(roles),SchBasePoint::getWorkshop_code,roles)
|
||||
.eq(ObjectUtil.isNotEmpty(region_code), SchBasePoint::getRegion_code, region_code)
|
||||
.eq(ObjectUtil.isNotEmpty(point_type), SchBasePoint::getPoint_type, point_type)
|
||||
.eq(ObjectUtil.isNotEmpty(point_status), SchBasePoint::getPoint_status, point_status)
|
||||
@@ -182,6 +183,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
if (ObjectUtil.isEmpty(region)) return this.list();
|
||||
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getRegion_code, region.getRegion_code())
|
||||
.like(region.getPoint_code()!=null,SchBasePoint::getPoint_code, region.getPoint_code())
|
||||
.eq(SchBasePoint::getIs_has_workder, 1));
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package org.nl.wms.sch.report;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.base.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.logging.annotation.Log;
|
||||
import org.nl.wms.sch.report.service.IReportService;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = "报表管理")
|
||||
@RequestMapping("/api/report")
|
||||
public class ReportController {
|
||||
|
||||
@Autowired
|
||||
private IReportService reportService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询组盘信息管理")
|
||||
@ApiOperation("查询组盘信息管理")
|
||||
//@SaCheckPermission("@el.check('material:list')")
|
||||
public ResponseEntity<Object> query(ReportQuery whereJson, PageQuery page){
|
||||
return new ResponseEntity<>(TableDataInfo.build(reportService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.nl.wms.sch.report.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
|
||||
|
||||
public interface IReportService extends IService<ReportDto> {
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
* @param whereJson 条件
|
||||
* @param pageable 分页参数
|
||||
* @return IPage<Material>
|
||||
*/
|
||||
IPage<ReportDto> queryAll(ReportQuery whereJson, PageQuery pageable);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.nl.wms.sch.report.service.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
|
||||
import org.nl.wms.pdm.service.dto.PdmBdWorkorderQuery;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lyd
|
||||
* @date 2023-05-16
|
||||
**/
|
||||
public interface ReportMapper extends BaseMapper<ReportDto> {
|
||||
|
||||
/**
|
||||
* 分页查找
|
||||
* @return
|
||||
*/
|
||||
IPage<ReportDto> queryReport(IPage<ReportDto> pages, ReportQuery query);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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="org.nl.wms.sch.report.service.dao.mapper.ReportMapper">
|
||||
|
||||
<select id="queryReport" resultType="org.nl.wms.sch.report.service.dto.ReportDto">
|
||||
SELECT
|
||||
p.point_code as pointCode,
|
||||
m.productDescription,
|
||||
m.supplierName
|
||||
FROM
|
||||
sch_base_point p
|
||||
LEFT JOIN sch_base_material m ON p.vehicle_code2 = m.lotSN
|
||||
WHERE
|
||||
region_code IN ( 'HW', 'HWK' )
|
||||
AND vehicle_code2 IS NOT NULL
|
||||
AND vehicle_code2 != ''
|
||||
<if test="query.supplierName != null">
|
||||
and m.supplierName like CONCAT('%', #{query.supplierName}, '%')
|
||||
</if>
|
||||
<if test="query.productDescription != null">
|
||||
and m.productDescription like CONCAT('%', #{query.productDescription}, '%')
|
||||
</if>
|
||||
ORDER BY point_code ASC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.nl.wms.sch.report.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ReportDto implements Serializable {
|
||||
/** 点位编码 */
|
||||
private String pointCode;
|
||||
/** 物料名称 */
|
||||
private String productDescription;
|
||||
/** 供应商名称 */
|
||||
private String supplierName;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.nl.wms.sch.report.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class ReportQuery implements Serializable {
|
||||
//托盘号
|
||||
private String palletSN;
|
||||
//物料条码号
|
||||
private String lotSN;
|
||||
//物料名称
|
||||
private String productName;
|
||||
//供应商编码
|
||||
private String productDescription;
|
||||
//供应商编码
|
||||
private String supplierCode;
|
||||
//供应商名称
|
||||
private String supplierName;
|
||||
//绑定状态
|
||||
private String group_bind_material_status;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.nl.wms.sch.report.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
|
||||
import org.nl.wms.pdm.service.dto.PdmBdWorkorderQuery;
|
||||
import org.nl.wms.sch.material.service.dao.Material;
|
||||
import org.nl.wms.sch.material.service.dao.mapper.MaterialMapper;
|
||||
import org.nl.wms.sch.report.service.IReportService;
|
||||
import org.nl.wms.sch.report.service.dao.mapper.ReportMapper;
|
||||
import org.nl.wms.sch.report.service.dto.ReportDto;
|
||||
import org.nl.wms.sch.report.service.dto.ReportQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.nl.common.utils.PageUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ReportServiceImpl extends ServiceImpl<ReportMapper, ReportDto> implements IReportService {
|
||||
|
||||
@Autowired
|
||||
private ReportMapper reportMapper;
|
||||
|
||||
@Override
|
||||
public IPage<ReportDto> queryAll(ReportQuery query, PageQuery pageQuery){
|
||||
IPage<ReportDto> pages = new Page<>(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
pages = reportMapper.queryReport(pages, query);
|
||||
return pages;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -243,16 +243,19 @@ public class YCLCKTask extends AbstractTask {
|
||||
head.setSRC_MSGID(IdUtil.simpleUUID());
|
||||
head.setSRC_SYSTEM("AGV");
|
||||
qpmes065Request.setHEAD(head);
|
||||
for(Material material:materialList) {
|
||||
QPMES065RequestBody qpmes065RequestBody=new QPMES065RequestBody();
|
||||
double qty=0;
|
||||
for(Material material:materialList) {
|
||||
|
||||
qpmes065RequestBody.setMoname(extGroupData.getString("workorder_code"));
|
||||
qpmes065RequestBody.setLotSN(material.getPalletSN());
|
||||
qpmes065RequestBody.setQty(String.valueOf(one.getMaterial_qty()));
|
||||
qty+=Double.parseDouble(material.getQty());
|
||||
qpmes065RequestBody.setSiteName(material.getLocationCode());
|
||||
qpmes065RequestBody.setZXXV01(extGroupData.getString("workorder_code")!=null?"1":"0");
|
||||
qpmes065RequestBody.setZXXV02(taskObj.getVehicle_code());
|
||||
qpmes065RequestBodyList.add(qpmes065RequestBody);
|
||||
}
|
||||
qpmes065RequestBody.setQty(String.valueOf(qty));
|
||||
qpmes065RequestBodyList.add(qpmes065RequestBody);
|
||||
qpmes065Request.setBODY(qpmes065RequestBodyList);
|
||||
log.info("开始调用QPMES065服务,入参{}",JSON.toJSONString(qpmes065Request));
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
|
||||
@@ -266,6 +266,8 @@
|
||||
<el-table-column prop="vehicle_code" label="载具编码" :min-width="flexWidth('vehicle_code',crud.data,'载具编码')" />
|
||||
<el-table-column prop="vehicle_code2" label="子载具编码" :min-width="flexWidth('vehicle_code2',crud.data,'子载具编码')" />
|
||||
<el-table-column prop="vehicle_qty" label="载具数量" :min-width="flexWidth('vehicle_qty',crud.data,'载具数量')" />
|
||||
<!-- <el-table-column prop="product_description" label="物料名称" :min-width="flexWidth('product_description',crud.data,'物料名称')" />
|
||||
<el-table-column prop="supplier_name" label="供应商名称" :min-width="flexWidth('supplier_name',crud.data,'供应商名称')" /> -->
|
||||
<el-table-column label="是否锁定" :min-width="flexWidth('vehicle_qty',crud.data,'是否锁定')">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.ing_task_code?'是':'否' }}
|
||||
|
||||
333
lms/nladmin-ui/src/views/wms/sch/report/index.vue
Normal file
333
lms/nladmin-ui/src/views/wms/sch/report/index.vue
Normal file
@@ -0,0 +1,333 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="供应商名称">
|
||||
<el-input
|
||||
v-model="query.supplierName"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="供应商名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input
|
||||
v-model="query.productDescription"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="物料名称"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation />
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="800px">
|
||||
<el-form ref="form" style="border: 1px solid #cfe0df;margin-top: 10px;padding-top: 10px;" :inline="true" :model="form" :rules="rules" size="mini" label-width="115px" label-suffix=":">
|
||||
<el-form-item label="载具编码">
|
||||
<el-input v-model="form.vehicle_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="子载具编码">
|
||||
<el-input v-model="form.child_vehicle_code" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item v-if="false" label="来源载具">
|
||||
<el-input v-model="form.source_vehicle_code" style="width: 240px;" />
|
||||
</el-form-item> -->
|
||||
<el-form-item label="托盘类型">
|
||||
<el-radio-group v-model="form.vehicle_type" style="width: 240px">
|
||||
<el-radio label="1">子托盘</el-radio>
|
||||
<el-radio label="0">母托盘</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="回温开始时间">
|
||||
<el-date-picker
|
||||
v-model="form.instorage_time"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
style="width: 240px;"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="点位编码">
|
||||
<el-select
|
||||
v-model="form.point_code"
|
||||
filterable
|
||||
placeholder="请选择"
|
||||
style="width: 240px;"
|
||||
@change="setPointName"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in pointList"
|
||||
:key="item.point_code"
|
||||
:label="item.point_code"
|
||||
:value="item.point_code"
|
||||
>
|
||||
<span style="float: left">{{ item.point_name }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.point_code }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-input v-model="form.point_code" style="width: 240px;" />-->
|
||||
</el-form-item>
|
||||
<el-form-item label="点位名称">
|
||||
<el-input v-model="form.point_name" style="width: 240px;" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否满托">
|
||||
<el-radio-group v-model="form.is_full" style="width: 240px">
|
||||
<el-radio :label="true">是</el-radio>
|
||||
<el-radio :label="false">否</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<el-input v-model="form.pcsn" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="静置时间(分钟)">
|
||||
<el-input-number
|
||||
v-model.number="form.standing_time"
|
||||
:min="1"
|
||||
:max="999"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料数量">
|
||||
<el-input-number
|
||||
v-model.number="form.material_qty"
|
||||
:min="0"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物料重量">
|
||||
<el-input-number
|
||||
v-model.number="form.material_weight"
|
||||
:min="0"
|
||||
style="width: 240px;"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工单编码">
|
||||
<el-input v-model="form.workorder_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料来源">
|
||||
<el-radio-group v-model="choose" size="mini" style="width: 240px;">
|
||||
<el-radio-button label="物料" />
|
||||
<el-radio-button label="工单" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="false" label="物料名称">
|
||||
<el-input v-model="form.material_id" suffix-icon="el-icon-date" clearable style="width: 370px;" @focus="getMaterial" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称">
|
||||
<el-input v-model="form.material_name" clearable style="width: 240px;" @clear="clearMaterial" @focus="getMaterial" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码">
|
||||
<el-input v-model="form.material_code" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料规格">
|
||||
<el-input v-model="form.material_spec" disabled style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="组盘次数">
|
||||
<el-input v-model="form.group_number" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="任务编码">
|
||||
<el-input v-model="form.task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="车间编码">
|
||||
<el-input v-model="form.workshop_code" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="组盘状态">
|
||||
<el-select
|
||||
v-model="form.group_status"
|
||||
size="mini"
|
||||
placeholder="点位状态"
|
||||
class="filter-item"
|
||||
style="width: 240px;"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.group_status"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="是否首个流程任务">
|
||||
<el-input v-model="form.is_first_flow_task" style="width: 240px;" />
|
||||
</el-form-item>-->
|
||||
<el-form-item label="流程编码">
|
||||
<el-input v-model="form.flow_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="流程顺序">
|
||||
<el-input v-model="form.flow_num" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="上一任务">
|
||||
<el-input v-model="form.before_task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下一任务">
|
||||
<el-input v-model="form.next_task_code" style="width: 240px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input v-model.trim="form.remark" style="width: 480px;" rows="2" type="textarea" :disabled="crud.status.view > 0" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="pointCode" label="点位编码" :min-width="flexWidth('pointCode',crud.data,'点位编码')" />
|
||||
<el-table-column prop="supplierName" label="供应商名称" :min-width="flexWidth('supplierName',crud.data,'供应商名称')" />
|
||||
<el-table-column prop="productDescription" label="物料名称" :min-width="flexWidth('productDescription',crud.data,'物料名称')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudMaterial from './report'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudMdBaseWorkShop from '@/views/wms/basedata/workshop/mdBaseWorkshop'
|
||||
import crudSchBasePoint from '@/views/wms/sch/point/schBasePoint'
|
||||
import crudSchBaseRegion from '@/views/wms/sch/region/schBaseRegion'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
vehicle_code: null,
|
||||
vehicle_type: null,
|
||||
material_id: null,
|
||||
child_vehicle_code: null,
|
||||
source_vehicle_code: null,
|
||||
point_code: null,
|
||||
point_name: null,
|
||||
is_full: true,
|
||||
pcsn: null,
|
||||
instorage_time: null,
|
||||
standing_time: null,
|
||||
material_qty: null,
|
||||
material_weight: null,
|
||||
workorder_code: null,
|
||||
group_number: null,
|
||||
task_code: null,
|
||||
ext_data: null,
|
||||
workshop_code: null,
|
||||
group_status: null,
|
||||
table_name: null,
|
||||
table_fk: null,
|
||||
table_fk_id: null,
|
||||
buss_move_id: null,
|
||||
is_first_flow_task: true,
|
||||
flow_code: null,
|
||||
flow_num: null,
|
||||
before_task_code: null,
|
||||
next_task_code: null,
|
||||
remark: null,
|
||||
is_delete: false
|
||||
}
|
||||
export default {
|
||||
name: 'VehicleMaterialGroup',
|
||||
dicts: ['group_status', 'group_bind_material_status', 'vehicle_type'],
|
||||
components: {pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '组盘信息管理',
|
||||
url: 'api/report',
|
||||
idField: 'group_id',
|
||||
sort: 'pointCode,desc',
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: false
|
||||
},
|
||||
query: {
|
||||
group_bind_material_status: '2'
|
||||
},
|
||||
crudMethod: { ...crudMaterial }
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
},
|
||||
workShopList: [],
|
||||
pointList: [],
|
||||
regionList: [],
|
||||
choose: '物料'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getWorkShopList()
|
||||
this.getPointList()
|
||||
this.getRegionList()
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
getWorkShopList() { // 获取车间列表
|
||||
crudMdBaseWorkShop.getWorkShopList().then(res => {
|
||||
this.workShopList = res
|
||||
})
|
||||
},
|
||||
getRegionList() {
|
||||
crudSchBaseRegion.getRegionList().then(res => {
|
||||
this.regionList = res
|
||||
})
|
||||
},
|
||||
getPointList() { // 获取点位列表
|
||||
crudSchBasePoint.getPointList().then(res => {
|
||||
this.pointList = res
|
||||
})
|
||||
},
|
||||
tableChanged(row) {
|
||||
this.form.material_name = row.material_name
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_spec = row.material_spec
|
||||
this.form.material_code = row.material_code
|
||||
if (this.choose === '工单') {
|
||||
this.form.workorder_code = row.workorder_code
|
||||
}
|
||||
},
|
||||
clearMaterial() {
|
||||
this.form.material_name = null
|
||||
this.form.material_id = null
|
||||
this.form.material_spec = null
|
||||
this.form.material_code = null
|
||||
},
|
||||
setPointName(data) {
|
||||
var point = this.pointList.find(item => item.point_code === data)
|
||||
this.form.point_name = point.point_name
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
35
lms/nladmin-ui/src/views/wms/sch/report/report.js
Normal file
35
lms/nladmin-ui/src/views/wms/sch/report/report.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function add(data) {
|
||||
return request({
|
||||
url: 'api/report',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function del(ids) {
|
||||
return request({
|
||||
url: 'api/report/',
|
||||
method: 'delete',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
export function edit(data) {
|
||||
return request({
|
||||
url: 'api/report',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export function getGroup(data) {
|
||||
return request({
|
||||
url: 'api/report/getGroup',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getGroup }
|
||||
Reference in New Issue
Block a user