Merge branch 'master' of https://gitee.com/kutangguo/ktg-mes
This commit is contained in:
commit
5d8f4c664e
@ -1,10 +1,9 @@
|
|||||||
package com.ktg.common.constant;
|
package com.ktg.common.constant;
|
||||||
|
|
||||||
import org.omg.CORBA.PUBLIC_MEMBER;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户常量信息
|
* 用户常量信息
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public class UserConstants
|
public class UserConstants
|
||||||
@ -57,7 +56,7 @@ public class UserConstants
|
|||||||
|
|
||||||
/** Layout组件标识 */
|
/** Layout组件标识 */
|
||||||
public final static String LAYOUT = "Layout";
|
public final static String LAYOUT = "Layout";
|
||||||
|
|
||||||
/** ParentView组件标识 */
|
/** ParentView组件标识 */
|
||||||
public final static String PARENT_VIEW = "ParentView";
|
public final static String PARENT_VIEW = "ParentView";
|
||||||
|
|
||||||
@ -229,8 +228,12 @@ public class UserConstants
|
|||||||
public static final String BARCODE_TYPE_TRANSORDER = "TRANSORDER"; //流转单
|
public static final String BARCODE_TYPE_TRANSORDER = "TRANSORDER"; //流转单
|
||||||
public static final String BARCODE_TYPE_CLIENT = "CLIENT"; //客户
|
public static final String BARCODE_TYPE_CLIENT = "CLIENT"; //客户
|
||||||
public static final String BARCODE_TYPE_VENDOR = "VENDOR"; //供应商
|
public static final String BARCODE_TYPE_VENDOR = "VENDOR"; //供应商
|
||||||
|
public static final String BARCODE_TYPE_WORKSHOP = "WORKSHOP";
|
||||||
|
public static final String BARCODE_TYPE_WORKORDER = "WORKORDER";
|
||||||
|
public static final String BARCODE_TYPE_TOOL = "TOOL";
|
||||||
public static final String BARCODE_TYPE_SN = "SN";
|
public static final String BARCODE_TYPE_SN = "SN";
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消息状态
|
* 消息状态
|
||||||
*/
|
*/
|
||||||
|
@ -52,6 +52,10 @@
|
|||||||
<artifactId>swagger-models</artifactId>
|
<artifactId>swagger-models</artifactId>
|
||||||
<version>1.6.2</version>
|
<version>1.6.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
@ -1,31 +1,25 @@
|
|||||||
package com.ktg.mes.md.controller;
|
package com.ktg.mes.md.controller;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import com.ktg.common.constant.UserConstants;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ktg.common.annotation.Log;
|
import com.ktg.common.annotation.Log;
|
||||||
|
import com.ktg.common.constant.UserConstants;
|
||||||
import com.ktg.common.core.controller.BaseController;
|
import com.ktg.common.core.controller.BaseController;
|
||||||
import com.ktg.common.core.domain.AjaxResult;
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
import com.ktg.common.enums.BusinessType;
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
import com.ktg.mes.md.domain.MdWorkshop;
|
import com.ktg.mes.md.domain.MdWorkshop;
|
||||||
import com.ktg.mes.md.service.IMdWorkshopService;
|
import com.ktg.mes.md.service.IMdWorkshopService;
|
||||||
import com.ktg.common.utils.poi.ExcelUtil;
|
import com.ktg.mes.wm.utils.WmBarCodeUtil;
|
||||||
import com.ktg.common.core.page.TableDataInfo;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车间Controller
|
* 车间Controller
|
||||||
*
|
*
|
||||||
* @author yinjinlu
|
* @author yinjinlu
|
||||||
* @date 2022-05-07
|
* @date 2022-05-07
|
||||||
*/
|
*/
|
||||||
@ -36,6 +30,8 @@ public class MdWorkshopController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IMdWorkshopService mdWorkshopService;
|
private IMdWorkshopService mdWorkshopService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmBarCodeUtil wmBarCodeUtil;
|
||||||
/**
|
/**
|
||||||
* 查询车间列表
|
* 查询车间列表
|
||||||
*/
|
*/
|
||||||
@ -96,7 +92,9 @@ public class MdWorkshopController extends BaseController
|
|||||||
if(UserConstants.NOT_UNIQUE.equals(mdWorkshopService.checkWorkshopNameUnique(mdWorkshop))){
|
if(UserConstants.NOT_UNIQUE.equals(mdWorkshopService.checkWorkshopNameUnique(mdWorkshop))){
|
||||||
return AjaxResult.error("车间名称已存在!");
|
return AjaxResult.error("车间名称已存在!");
|
||||||
}
|
}
|
||||||
return toAjax(mdWorkshopService.insertMdWorkshop(mdWorkshop));
|
int i = mdWorkshopService.insertMdWorkshop(mdWorkshop);
|
||||||
|
wmBarCodeUtil.generateBarCode(UserConstants.BARCODE_TYPE_WORKSHOP,mdWorkshop.getWorkshopId(),mdWorkshop.getWorkshopCode(),mdWorkshop.getWorkshopName());
|
||||||
|
return toAjax(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,49 +1,37 @@
|
|||||||
package com.ktg.mes.pro.controller;
|
package com.ktg.mes.pro.controller;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.ktg.common.annotation.Log;
|
||||||
|
import com.ktg.common.constant.UserConstants;
|
||||||
|
import com.ktg.common.core.controller.BaseController;
|
||||||
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.mes.md.domain.MdProductBom;
|
||||||
|
import com.ktg.mes.md.service.IMdProductBomService;
|
||||||
|
import com.ktg.mes.pro.domain.ProTask;
|
||||||
|
import com.ktg.mes.pro.domain.ProWorkorder;
|
||||||
|
import com.ktg.mes.pro.domain.ProWorkorderBom;
|
||||||
|
import com.ktg.mes.pro.service.IProTaskService;
|
||||||
|
import com.ktg.mes.pro.service.IProWorkorderBomService;
|
||||||
|
import com.ktg.mes.pro.service.IProWorkorderService;
|
||||||
|
import com.ktg.mes.wm.utils.WmBarCodeUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import com.ktg.common.constant.UserConstants;
|
|
||||||
import com.ktg.common.core.page.TableDataInfo;
|
|
||||||
import com.ktg.common.utils.StringUtils;
|
|
||||||
import com.ktg.mes.md.domain.MdItem;
|
|
||||||
import com.ktg.mes.md.domain.MdProductBom;
|
|
||||||
import com.ktg.mes.md.service.IMdProductBomService;
|
|
||||||
import com.ktg.mes.pro.domain.ProTask;
|
|
||||||
import com.ktg.mes.pro.domain.ProWorkorderBom;
|
|
||||||
import com.ktg.mes.pro.service.IProTaskService;
|
|
||||||
import com.ktg.mes.pro.service.IProWorkorderBomService;
|
|
||||||
import com.ktg.mes.wm.domain.WmRtIssue;
|
|
||||||
import com.ktg.mes.wm.domain.WmRtIssueLine;
|
|
||||||
import com.ktg.mes.wm.domain.tx.RtIssueTxBean;
|
|
||||||
import io.minio.messages.Item;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ktg.common.annotation.Log;
|
|
||||||
import com.ktg.common.core.controller.BaseController;
|
|
||||||
import com.ktg.common.core.domain.AjaxResult;
|
|
||||||
import com.ktg.common.enums.BusinessType;
|
|
||||||
import com.ktg.mes.pro.domain.ProWorkorder;
|
|
||||||
import com.ktg.mes.pro.service.IProWorkorderService;
|
|
||||||
import com.ktg.common.utils.poi.ExcelUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产工单Controller
|
* 生产工单Controller
|
||||||
*
|
*
|
||||||
* @author yinjinlu
|
* @author yinjinlu
|
||||||
* @date 2022-05-09
|
* @date 2022-05-09
|
||||||
*/
|
*/
|
||||||
@ -63,6 +51,9 @@ public class ProWorkorderController extends BaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IProTaskService proTaskService;
|
private IProTaskService proTaskService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WmBarCodeUtil wmBarCodeUtil;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生产工单列表
|
* 查询生产工单列表
|
||||||
*/
|
*/
|
||||||
@ -129,6 +120,7 @@ public class ProWorkorderController extends BaseController
|
|||||||
Long workorderId = proWorkorder.getWorkorderId();
|
Long workorderId = proWorkorder.getWorkorderId();
|
||||||
generateBomLine(workorderId);
|
generateBomLine(workorderId);
|
||||||
proWorkorder.setCreateBy(getUsername());
|
proWorkorder.setCreateBy(getUsername());
|
||||||
|
wmBarCodeUtil.generateBarCode(UserConstants.BARCODE_TYPE_WORKORDER,proWorkorder.getWorkorderId(),proWorkorder.getWorkorderCode(),proWorkorder.getWorkorderName());
|
||||||
return AjaxResult.success(workorderId);
|
return AjaxResult.success(workorderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,27 +1,36 @@
|
|||||||
package com.ktg.mes.pro.mapper;
|
package com.ktg.mes.pro.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ktg.mes.pro.domain.ProWorkorder;
|
import com.ktg.mes.pro.domain.ProWorkorder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产工单Mapper接口
|
* 生产工单Mapper接口
|
||||||
*
|
*
|
||||||
* @author yinjinlu
|
* @author yinjinlu
|
||||||
* @date 2022-05-09
|
* @date 2022-05-09
|
||||||
*/
|
*/
|
||||||
public interface ProWorkorderMapper
|
public interface ProWorkorderMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询生产工单
|
* 查询生产工单
|
||||||
*
|
*
|
||||||
* @param workorderId 生产工单主键
|
* @param workorderId 生产工单主键
|
||||||
* @return 生产工单
|
* @return 生产工单
|
||||||
*/
|
*/
|
||||||
public ProWorkorder selectProWorkorderByWorkorderId(Long workorderId);
|
public ProWorkorder selectProWorkorderByWorkorderId(Long workorderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产工单
|
||||||
|
*
|
||||||
|
* @param workorderId 生产工单主键
|
||||||
|
* @return 生产工单
|
||||||
|
*/
|
||||||
|
public List<ProWorkorder> selectProWorkorderListByParentId(Long workorderId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生产工单列表
|
* 查询生产工单列表
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 生产工单集合
|
* @return 生产工单集合
|
||||||
*/
|
*/
|
||||||
@ -31,7 +40,7 @@ public interface ProWorkorderMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增生产工单
|
* 新增生产工单
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -39,7 +48,7 @@ public interface ProWorkorderMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改生产工单
|
* 修改生产工单
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -47,7 +56,7 @@ public interface ProWorkorderMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除生产工单
|
* 删除生产工单
|
||||||
*
|
*
|
||||||
* @param workorderId 生产工单主键
|
* @param workorderId 生产工单主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -55,7 +64,7 @@ public interface ProWorkorderMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除生产工单
|
* 批量删除生产工单
|
||||||
*
|
*
|
||||||
* @param workorderIds 需要删除的数据主键集合
|
* @param workorderIds 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -1,27 +1,36 @@
|
|||||||
package com.ktg.mes.pro.service;
|
package com.ktg.mes.pro.service;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ktg.mes.pro.domain.ProWorkorder;
|
import com.ktg.mes.pro.domain.ProWorkorder;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产工单Service接口
|
* 生产工单Service接口
|
||||||
*
|
*
|
||||||
* @author yinjinlu
|
* @author yinjinlu
|
||||||
* @date 2022-05-09
|
* @date 2022-05-09
|
||||||
*/
|
*/
|
||||||
public interface IProWorkorderService
|
public interface IProWorkorderService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询生产工单
|
* 查询生产工单
|
||||||
*
|
*
|
||||||
* @param workorderId 生产工单主键
|
* @param workorderId 生产工单主键
|
||||||
* @return 生产工单
|
* @return 生产工单
|
||||||
*/
|
*/
|
||||||
public ProWorkorder selectProWorkorderByWorkorderId(Long workorderId);
|
public ProWorkorder selectProWorkorderByWorkorderId(Long workorderId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产工单
|
||||||
|
*
|
||||||
|
* @param workorderId 生产工单主键
|
||||||
|
* @return 生产工单
|
||||||
|
*/
|
||||||
|
public List<ProWorkorder> selectProWorkorderListByParentId(Long workorderId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生产工单列表
|
* 查询生产工单列表
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 生产工单集合
|
* @return 生产工单集合
|
||||||
*/
|
*/
|
||||||
@ -32,7 +41,7 @@ public interface IProWorkorderService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增生产工单
|
* 新增生产工单
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -40,7 +49,7 @@ public interface IProWorkorderService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改生产工单
|
* 修改生产工单
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -48,7 +57,7 @@ public interface IProWorkorderService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除生产工单
|
* 批量删除生产工单
|
||||||
*
|
*
|
||||||
* @param workorderIds 需要删除的生产工单主键集合
|
* @param workorderIds 需要删除的生产工单主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -56,7 +65,7 @@ public interface IProWorkorderService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除生产工单信息
|
* 删除生产工单信息
|
||||||
*
|
*
|
||||||
* @param workorderId 生产工单主键
|
* @param workorderId 生产工单主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -1,32 +1,31 @@
|
|||||||
package com.ktg.mes.pro.service.impl;
|
package com.ktg.mes.pro.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.ktg.common.constant.UserConstants;
|
import com.ktg.common.constant.UserConstants;
|
||||||
import com.ktg.common.utils.DateUtils;
|
import com.ktg.common.utils.DateUtils;
|
||||||
import com.ktg.common.utils.StringUtils;
|
import com.ktg.common.utils.StringUtils;
|
||||||
import com.ktg.mes.dv.domain.DvMachineryType;
|
import com.ktg.mes.pro.domain.ProWorkorder;
|
||||||
|
import com.ktg.mes.pro.mapper.ProWorkorderMapper;
|
||||||
|
import com.ktg.mes.pro.service.IProWorkorderService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ktg.mes.pro.mapper.ProWorkorderMapper;
|
|
||||||
import com.ktg.mes.pro.domain.ProWorkorder;
|
import java.util.List;
|
||||||
import com.ktg.mes.pro.service.IProWorkorderService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生产工单Service业务层处理
|
* 生产工单Service业务层处理
|
||||||
*
|
*
|
||||||
* @author yinjinlu
|
* @author yinjinlu
|
||||||
* @date 2022-05-09
|
* @date 2022-05-09
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class ProWorkorderServiceImpl implements IProWorkorderService
|
public class ProWorkorderServiceImpl implements IProWorkorderService
|
||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProWorkorderMapper proWorkorderMapper;
|
private ProWorkorderMapper proWorkorderMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生产工单
|
* 查询生产工单
|
||||||
*
|
*
|
||||||
* @param workorderId 生产工单主键
|
* @param workorderId 生产工单主键
|
||||||
* @return 生产工单
|
* @return 生产工单
|
||||||
*/
|
*/
|
||||||
@ -36,9 +35,21 @@ public class ProWorkorderServiceImpl implements IProWorkorderService
|
|||||||
return proWorkorderMapper.selectProWorkorderByWorkorderId(workorderId);
|
return proWorkorderMapper.selectProWorkorderByWorkorderId(workorderId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询生产工单
|
||||||
|
*
|
||||||
|
* @param workorderId 生产工单主键
|
||||||
|
* @return 生产工单
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ProWorkorder> selectProWorkorderListByParentId(Long workorderId)
|
||||||
|
{
|
||||||
|
return proWorkorderMapper.selectProWorkorderListByParentId(workorderId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生产工单列表
|
* 查询生产工单列表
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 生产工单
|
* @return 生产工单
|
||||||
*/
|
*/
|
||||||
@ -61,7 +72,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增生产工单
|
* 新增生产工单
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -81,7 +92,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改生产工单
|
* 修改生产工单
|
||||||
*
|
*
|
||||||
* @param proWorkorder 生产工单
|
* @param proWorkorder 生产工单
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -94,7 +105,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除生产工单
|
* 批量删除生产工单
|
||||||
*
|
*
|
||||||
* @param workorderIds 需要删除的生产工单主键
|
* @param workorderIds 需要删除的生产工单主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -106,7 +117,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除生产工单信息
|
* 删除生产工单信息
|
||||||
*
|
*
|
||||||
* @param workorderId 生产工单主键
|
* @param workorderId 生产工单主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,65 @@
|
|||||||
|
package com.ktg.mes.report.bean;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.ktg.mes.pro.domain.ProWorkorder;
|
||||||
|
import com.ktg.mes.pro.service.IProWorkorderService;
|
||||||
|
import com.ktg.mes.wm.domain.WmBarcode;
|
||||||
|
import com.ktg.mes.wm.service.IWmBarcodeService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class PmReportBean {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProWorkorderService proWorkorderService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IWmBarcodeService wmBarcodeService;
|
||||||
|
public List<ProWorkorder> getData(String dsName, String datasetName, Map<String, Object> parameters) {
|
||||||
|
|
||||||
|
String id = MapUtils.getString(parameters, "id");
|
||||||
|
ProWorkorder proWorkorder = proWorkorderService.selectProWorkorderByWorkorderId(Long.parseLong(id));
|
||||||
|
|
||||||
|
List<ProWorkorder> list = new ArrayList<>();
|
||||||
|
list.add(proWorkorder);
|
||||||
|
log.info("PmReportBean dsName :" + dsName + ", datasetName :" + datasetName + ", resp:" + JSON.toJSONString(list));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
public List<ProWorkorder> getChildData(String dsName, String datasetName, Map<String, Object> parameters) {
|
||||||
|
|
||||||
|
String id = MapUtils.getString(parameters, "id");
|
||||||
|
|
||||||
|
List<ProWorkorder> proWorkorders = proWorkorderService.selectProWorkorderListByParentId(Long.parseLong(id));
|
||||||
|
|
||||||
|
|
||||||
|
List<ProWorkorder> list = new ArrayList<>();
|
||||||
|
log.info("PmReportBean dsName :" + dsName + ", datasetName :" + datasetName + ", resp:" + JSON.toJSONString(list));
|
||||||
|
return proWorkorders;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WmBarcode> getQc(String dsName, String datasetName, Map<String, Object> parameters) {
|
||||||
|
|
||||||
|
String id = MapUtils.getString(parameters, "id");
|
||||||
|
WmBarcode wmBarcode = new WmBarcode();
|
||||||
|
wmBarcode.setBarcodeId(Long.parseLong(id));
|
||||||
|
|
||||||
|
List<WmBarcode> codeList = wmBarcodeService.selectWmBarcodeList(wmBarcode);
|
||||||
|
List<WmBarcode> list = new ArrayList<>();
|
||||||
|
|
||||||
|
if(!CollectionUtils.isEmpty(codeList)){
|
||||||
|
list.add(codeList.get(0));
|
||||||
|
}
|
||||||
|
log.info("PmReportBean dsName :" + dsName + ", datasetName :" + datasetName + ", resp:" + JSON.toJSONString(list));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
}
|
@ -1,33 +1,27 @@
|
|||||||
package com.ktg.mes.tm.controller;
|
package com.ktg.mes.tm.controller;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import com.ktg.common.constant.UserConstants;
|
|
||||||
import com.ktg.mes.tm.domain.TmToolType;
|
|
||||||
import com.ktg.mes.tm.service.ITmToolTypeService;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ktg.common.annotation.Log;
|
import com.ktg.common.annotation.Log;
|
||||||
|
import com.ktg.common.constant.UserConstants;
|
||||||
import com.ktg.common.core.controller.BaseController;
|
import com.ktg.common.core.controller.BaseController;
|
||||||
import com.ktg.common.core.domain.AjaxResult;
|
import com.ktg.common.core.domain.AjaxResult;
|
||||||
import com.ktg.common.enums.BusinessType;
|
|
||||||
import com.ktg.mes.tm.domain.TmTool;
|
|
||||||
import com.ktg.mes.tm.service.ITmToolService;
|
|
||||||
import com.ktg.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ktg.common.core.page.TableDataInfo;
|
import com.ktg.common.core.page.TableDataInfo;
|
||||||
|
import com.ktg.common.enums.BusinessType;
|
||||||
|
import com.ktg.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ktg.mes.tm.domain.TmTool;
|
||||||
|
import com.ktg.mes.tm.domain.TmToolType;
|
||||||
|
import com.ktg.mes.tm.service.ITmToolService;
|
||||||
|
import com.ktg.mes.tm.service.ITmToolTypeService;
|
||||||
|
import com.ktg.mes.wm.utils.WmBarCodeUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工装夹具清单Controller
|
* 工装夹具清单Controller
|
||||||
*
|
*
|
||||||
* @author yinjinlu
|
* @author yinjinlu
|
||||||
* @date 2022-05-11
|
* @date 2022-05-11
|
||||||
*/
|
*/
|
||||||
@ -40,7 +34,8 @@ public class TmToolController extends BaseController
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ITmToolTypeService tmToolTypeService;
|
private ITmToolTypeService tmToolTypeService;
|
||||||
|
@Autowired
|
||||||
|
private WmBarCodeUtil wmBarCodeUtil;
|
||||||
/**
|
/**
|
||||||
* 查询工装夹具清单列表
|
* 查询工装夹具清单列表
|
||||||
*/
|
*/
|
||||||
@ -91,7 +86,9 @@ public class TmToolController extends BaseController
|
|||||||
tmTool.setToolTypeCode(type.getToolTypeCode());
|
tmTool.setToolTypeCode(type.getToolTypeCode());
|
||||||
tmTool.setToolTypeName(type.getToolTypeName());
|
tmTool.setToolTypeName(type.getToolTypeName());
|
||||||
tmTool.setCodeFlag(type.getCodeFlag());
|
tmTool.setCodeFlag(type.getCodeFlag());
|
||||||
return toAjax(tmToolService.insertTmTool(tmTool));
|
int i = tmToolService.insertTmTool(tmTool);
|
||||||
|
wmBarCodeUtil.generateBarCode(UserConstants.BARCODE_TYPE_TOOL,tmTool.getToolId(),tmTool.getToolCode(),tmTool.getToolName());
|
||||||
|
return toAjax(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -85,6 +85,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
where workorder_id = #{workorderId}
|
where workorder_id = #{workorderId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectProWorkorderListByParentId" parameterType="Long" resultMap="ProWorkorderResult">
|
||||||
|
<include refid="selectProWorkorderVo"/>
|
||||||
|
where parent_id = #{parentId}
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="checkWorkorderCodeUnique" parameterType="ProWorkorder" resultMap="ProWorkorderResult">
|
<select id="checkWorkorderCodeUnique" parameterType="ProWorkorder" resultMap="ProWorkorderResult">
|
||||||
<include refid="selectProWorkorderVo"/>
|
<include refid="selectProWorkorderVo"/>
|
||||||
where workorder_code = #{workorderCode} limit 1
|
where workorder_code = #{workorderCode} limit 1
|
||||||
|
BIN
ktg-mes/src/main/resources/static/logo.png
Normal file
BIN
ktg-mes/src/main/resources/static/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
9
ktg-mes/src/main/resources/ureport-context.xml
Normal file
9
ktg-mes/src/main/resources/ureport-context.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
|
||||||
|
|
||||||
|
<import resource="classpath:ureport-console-context.xml"/>
|
||||||
|
|
||||||
|
<bean id="pmReportBean" class="com.ktg.mes.report.bean.PmReportBean"></bean>
|
||||||
|
</beans>
|
Loading…
Reference in New Issue
Block a user