生产订单管理模块(产线更换为机型)

highway
wws 1 year ago
parent b6c4c30f9a
commit cf38b80dc7

@ -80,7 +80,7 @@ public class ProOrderController extends BaseController {
} }
/** /**
* 线 *
* *
* @return * @return
*/ */

@ -1,6 +1,6 @@
package com.op.mes.domain; package com.op.mes.domain;
//线体实体 //线体成型机
public class ProLine { public class ProLine {
private String key; private String key;
private String label; private String label;

@ -2,6 +2,7 @@ package com.op.mes.mapper;
import java.util.List; import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.mes.domain.Convert; import com.op.mes.domain.Convert;
import com.op.mes.domain.ProLine; import com.op.mes.domain.ProLine;
import com.op.mes.domain.ProOrder; import com.op.mes.domain.ProOrder;
@ -73,11 +74,12 @@ public interface ProOrderMapper {
public int deleteProOrderByIds(String[] ids); public int deleteProOrderByIds(String[] ids);
/** /**
* 线 *
* *
* @return * @return
*/ */
@Select(" SELECT sf.f_code [key],sf.factory_name label FROM sys_factory sf WHERE sf.f_type='l' AND sf.status = '1' AND sf.del_flag = '0' ") @DS("master")
@Select(" SELECT sda.dict_code AS 'key', sda.dict_label AS 'label' FROM sys_dict_data sda WHERE sda.status = '0' AND sda.dict_value = 'equ_type_cxj' ")
public List<ProLine> selectProdLine(); public List<ProLine> selectProdLine();
/** /**
@ -100,7 +102,8 @@ public interface ProOrderMapper {
* *
* @return * @return
*/ */
@Select("SELECT sf.factory_name name FROM sys_factory sf WHERE sf.f_type='l' AND sf.status = '1' AND sf.del_flag = '0' AND sf.f_code = #{prodLineCode}") @DS("master")
@Select("SELECT sda.dict_label AS 'prodLineName' FROM sys_dict_data sda WHERE sda.status = '0' AND sda.dict_value = 'equ_type_cxj' AND sda.dict_code = #{prodLineName}")
String selectProdLineName(String prodLineCode); String selectProdLineName(String prodLineCode);
/** /**

@ -17,7 +17,7 @@ import com.op.mes.domain.vo.LineAndShiftVo;
public interface IProOrderService { public interface IProOrderService {
/** /**
* 线 *
* *
* @return * @return
*/ */

@ -132,9 +132,8 @@ public class ProOrderServiceImpl implements IProOrderService {
List<ProOrderWorkorder> proOrderWorkorderList = proOrderWorkorderMapper.selectFirWorkOrder(id); List<ProOrderWorkorder> proOrderWorkorderList = proOrderWorkorderMapper.selectFirWorkOrder(id);
// 母工单循环遍历 // 母工单循环遍历
for (int i = 0;i < proOrderWorkorderList.size();i++){ for (int i = 0;i < proOrderWorkorderList.size();i++){
// 通过设备code查询出设备名称 // 通过设备code查询出机型名称
String prodLineName = proOrderMapper.selectProdLineName(proOrderWorkorderList.get(i).getProdLineCode()); String prodLineName = proOrderMapper.selectProdLineName(proOrderWorkorderList.get(i).getProdLineCode());
// 这里因为没有相对应字段所以用atrr1来表示批次号list
// 通过工单id查询批次号 // 通过工单id查询批次号
List<String> batchCodeList = proOrderMapper.selectBatchCodesById(proOrderWorkorderList.get(i).getWorkorderId()); List<String> batchCodeList = proOrderMapper.selectBatchCodesById(proOrderWorkorderList.get(i).getWorkorderId());
// 格式化数据 // 格式化数据
@ -195,7 +194,7 @@ public class ProOrderServiceImpl implements IProOrderService {
} }
/** /**
* 线 *
* *
* @return * @return
*/ */
@ -213,7 +212,6 @@ public class ProOrderServiceImpl implements IProOrderService {
* @return * @return
*/ */
@Override @Override
@DS("#header.poolName")
public ProOrder selectProOrderById(String id) { public ProOrder selectProOrderById(String id) {
return proOrderMapper.selectProOrderById(id); return proOrderMapper.selectProOrderById(id);
} }

Loading…
Cancel
Save