diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderMapper.java index eed9b7c9..a3dc46af 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderMapper.java @@ -2,12 +2,10 @@ package com.op.mes.mapper; import java.util.List; -import com.baomidou.dynamic.datasource.annotation.DS; import com.op.mes.domain.Convert; import com.op.mes.domain.ProLine; import com.op.mes.domain.ProOrder; import com.op.mes.domain.ProShift; -import org.apache.ibatis.annotations.Select; /** * 订单Mapper接口 @@ -78,7 +76,6 @@ public interface ProOrderMapper { * * @return */ - @Select(" SELECT equipment_id AS 'key', equipment_name AS 'label' FROM base_equipment WHERE equipment_type_code = 'equ_type_cxj' ") public List selectProdLine(); /** @@ -86,7 +83,6 @@ public interface ProOrderMapper { * * @return */ - @Select("SELECT bst.Shift_Id shiftId,bst.Shift_Desc_Global shiftDesc FROM base_shifts_t bst") public List selectProShift(); /** @@ -101,7 +97,6 @@ public interface ProOrderMapper { * * @return */ - @Select("SELECT equipment_name AS 'prodLineName' FROM base_equipment WHERE equipment_id = #{prodLineCode}") String selectProdLineName(String prodLineCode); /** @@ -109,7 +104,6 @@ public interface ProOrderMapper { * * @return */ - @Select("SELECT batch_code FROM pro_order_workorder_batch WHERE status = '1' GROUP BY batch_code") List selectBatchCodes(); @@ -127,7 +121,6 @@ public interface ProOrderMapper { * @param prodLineCode * @return */ - @Select("SELECT sf.factory_name FROM sys_factory sf WHERE sf.f_code = #{prodLineCode}") String selectBatchNameByCode(String prodLineCode); /** @@ -136,7 +129,6 @@ public interface ProOrderMapper { * @param workorderId * @return */ - @Select("SELECT powb.batch_code FROM pro_order_workorder_batch powb LEFT JOIN pro_order_workorder pow ON powb.workorder_id = pow.workorder_id WHERE pow.workorder_id = #{workorderId}") List selectBatchCodesById(String workorderId); /** @@ -144,6 +136,5 @@ public interface ProOrderMapper { * * @return */ - @Select(" SELECT equipment_id AS 'key', equipment_name AS 'label' FROM base_equipment WHERE equipment_type_code = 'equ_type_bzx' ") public List selectPackageLine(); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderWorkorderBatchMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderWorkorderBatchMapper.java index dd225b61..9bcb9980 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderWorkorderBatchMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderWorkorderBatchMapper.java @@ -1,8 +1,6 @@ package com.op.mes.mapper; -import com.op.mes.domain.Batch; import com.op.mes.domain.ProOrderWorkorderBatch; -import org.apache.ibatis.annotations.Select; import java.util.List; diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderWorkorderMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderWorkorderMapper.java index 2e51984f..044fe229 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderWorkorderMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/ProOrderWorkorderMapper.java @@ -1,7 +1,6 @@ package com.op.mes.mapper; import com.op.mes.domain.ProOrderWorkorder; -import org.apache.ibatis.annotations.Select; import java.util.Date; import java.util.List; @@ -91,6 +90,5 @@ public interface ProOrderWorkorderMapper { * @param id * @return */ - @Select("select TOP 1 workorder_code FROM pro_order_workorder WHERE order_id = #{id} ORDER BY workorder_code DESC") String selectEndWorkOrder(String id); } \ No newline at end of file diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/SysUserMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/SysUserMapper.java deleted file mode 100644 index 6998e34c..00000000 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/SysUserMapper.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.op.mes.mapper; - -import java.util.List; -import org.apache.ibatis.annotations.Param; -import com.op.system.api.domain.SysUser; - -/** - * 用户表 数据层 - * - * @author OP - */ -public interface SysUserMapper { - /** - * 根据条件分页查询用户列表 - * - * @param sysUser 用户信息 - * @return 用户信息集合信息 - */ - public List selectUserList(SysUser sysUser); - - /** - * 根据条件分页查询已配用户角色列表 - * - * @param user 用户信息 - * @return 用户信息集合信息 - */ - public List selectAllocatedList(SysUser user); - - /** - * 根据条件分页查询未分配用户角色列表 - * - * @param user 用户信息 - * @return 用户信息集合信息 - */ - public List selectUnallocatedList(SysUser user); - - /** - * 通过用户名查询用户 - * - * @param userName 用户名 - * @return 用户对象信息 - */ - public SysUser selectUserByUserName(String userName); - - /** - * 通过用户ID查询用户 - * - * @param userId 用户ID - * @return 用户对象信息 - */ - public SysUser selectUserById(Long userId); - - /** - * 新增用户信息 - * - * @param user 用户信息 - * @return 结果 - */ - public int insertUser(SysUser user); - - /** - * 修改用户信息 - * - * @param user 用户信息 - * @return 结果 - */ - public int updateUser(SysUser user); - - /** - * 修改用户头像 - * - * @param userName 用户名 - * @param avatar 头像地址 - * @return 结果 - */ - public int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar); - - /** - * 重置用户密码 - * - * @param userName 用户名 - * @param password 密码 - * @return 结果 - */ - public int resetUserPwd(@Param("userName") String userName, @Param("password") String password); - - /** - * 通过用户ID删除用户 - * - * @param userId 用户ID - * @return 结果 - */ - public int deleteUserById(Long userId); - - /** - * 批量删除用户信息 - * - * @param userIds 需要删除的用户ID - * @return 结果 - */ - public int deleteUserByIds(Long[] userIds); - - /** - * 校验用户名称是否唯一 - * - * @param userName 用户名称 - * @return 结果 - */ - public SysUser checkUserNameUnique(String userName); - - /** - * 校验手机号码是否唯一 - * - * @param phonenumber 手机号码 - * @return 结果 - */ - public SysUser checkPhoneUnique(String phonenumber); - - /** - * 校验email是否唯一 - * - * @param email 用户邮箱 - * @return 结果 - */ - public SysUser checkEmailUnique(String email); -} diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProOrderServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProOrderServiceImpl.java index 7ed2da41..5aa080ae 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProOrderServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/ProOrderServiceImpl.java @@ -360,7 +360,7 @@ public class ProOrderServiceImpl implements IProOrderService { } /** - * 设置工单属性 + * 设置工单属性(并更新订单信息) * * @param proOrderWorkorder * @param proOrder @@ -373,7 +373,13 @@ public class ProOrderServiceImpl implements IProOrderService { proOrder.setUpdateBy(SecurityContextHolder.getUserName()); proOrder.setUpdateTime(date); // 设置订单状态 - proOrder.setStatus("o1"); + if (proOrder.getQuantitySplit() == null && proOrder.getQuantity() == Long.valueOf(proOrder.getAtrr1())){ + proOrder.setStatus("o1"); + }else if (proOrder.getQuantitySplit() != null && (proOrder.getQuantitySplit()+Long.valueOf(proOrder.getAtrr1()) == proOrder.getQuantity())){ + proOrder.setStatus("o1"); + }else { + proOrder.setStatus("o0"); + } // 更新订单表 proOrderMapper.updateOrder(proOrder); // 生成对应的工单表 diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/ProOrderMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/ProOrderMapper.xml index 48e9cb43..a5ba576f 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/ProOrderMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/ProOrderMapper.xml @@ -78,6 +78,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where parent_order = #{orderCode} + + + + + + + + + + + + + + insert into pro_order diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/ProOrderWorkorderMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/ProOrderWorkorderMapper.xml index 96363616..527da2d4 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/ProOrderWorkorderMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/ProOrderWorkorderMapper.xml @@ -94,6 +94,13 @@ ) + + insert into pro_order_workorder