Merge remote-tracking branch 'origin/master'

master
mengjiao 4 months ago
commit 4d06ca0e40

@ -119,7 +119,7 @@
from mes_material_transfer_result mt
left join base_equipment equ on mt.equipmentCode = equ.equipment_code
where CONVERT(varchar(10),mt.update_time, 120) = #{ymd} and equ.equipment_name is not null
and equ.equipment_type_code = #{equTypeCode}
and equ.equipment_type_code = #{equTypeCode} and mt.equipmentCode not in('H61','H62','H63')
<if test="shiftId != null and shiftId != ''">
and mt.shift_id = #{shiftId}
</if>

@ -9,10 +9,9 @@ import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSONObject;
import com.op.common.core.domain.ExcelCol;
import com.op.common.core.exception.ServiceException;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.poi.ExcelMapUtil;
import com.op.plan.domain.ProLine;
import com.op.plan.domain.ProOrder;
import com.op.plan.domain.ProOrderWorkorderBatch;
import com.op.plan.domain.*;
import com.op.plan.domain.dto.SplitOrderDTO;
import com.op.plan.service.IProWetMaterialPlanDetailService;
import com.op.plan.service.IProWetMaterialPlanService;
@ -32,7 +31,6 @@ import org.springframework.web.bind.annotation.RestController;
import com.op.common.log.annotation.Log;
import com.op.common.log.enums.BusinessType;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.plan.domain.ProOrderWorkorder;
import com.op.plan.service.IProOrderWorkorderService;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
@ -304,6 +302,22 @@ public class ProOrderWorkorderController extends BaseController {
@Log(title = "下发生产工单", businessType = BusinessType.OTHER)
@PostMapping("/downWorkorder/{workorderIds}")
public AjaxResult downWorkorder(@PathVariable String[] workorderIds) {
List<BaseProduct> packageTypes = proOrderWorkorderService.getPackType(workorderIds);
if(CollectionUtils.isEmpty(packageTypes)){
return AjaxResult.error("请先维护垛型箱型!");
}else{
for(BaseProduct ptype:packageTypes){
if(ptype == null){
return AjaxResult.error("请先维护垛型箱型!");
}
if(StringUtils.isEmpty(ptype.getBoxType())){
return AjaxResult.error("请先维护箱型!");
}
if(StringUtils.isEmpty(ptype.getPackType())){
return AjaxResult.error("请先维护垛型!");
}
}
}
List<String> orderNotW0 = proOrderWorkorderService.getOrderNotW0(workorderIds);
if(workorderIds.length != orderNotW0.size()){
return AjaxResult.error("存在已经派发的订单,请重新选择工单!");

@ -10,6 +10,24 @@ public class BaseProduct {
private String mtart;
private BigDecimal batchQuaStandar;
private BigDecimal umrez;
private String boxType;
private String packType;
public String getBoxType() {
return boxType;
}
public void setBoxType(String boxType) {
this.boxType = boxType;
}
public String getPackType() {
return packType;
}
public void setPackType(String packType) {
this.packType = packType;
}
public BigDecimal getBatchQuaStandar() {
return batchQuaStandar;

@ -266,5 +266,7 @@ public interface ProOrderWorkorderMapper {
String getPlanLineCodes(String workorderId);
List<ProOrderWorkorder> getBPNBomList(ProOrderWorkorder proOrderWorkorder);
List<BaseProduct> getPackType(@Param("workorderCodes")String[] workorderCodes);
}

@ -2,10 +2,7 @@ package com.op.plan.service;
import com.op.common.core.web.domain.AjaxResult;
import com.op.plan.domain.ProLine;
import com.op.plan.domain.ProOrder;
import com.op.plan.domain.ProOrderWorkorder;
import com.op.plan.domain.ProOrderWorkorderBatch;
import com.op.plan.domain.*;
import com.op.plan.domain.dto.SplitOrderDTO;
import java.util.HashMap;
@ -163,4 +160,6 @@ public interface IProOrderWorkorderService {
List<HashMap> getPowExportData(ProOrderWorkorder proOrderWorkorder);
List<ProOrderWorkorder> getBPNBomList(ProOrderWorkorder proOrderWorkorder);
List<BaseProduct> getPackType(String[] workorderIds);
}

@ -1119,6 +1119,12 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
return proOrderWorkorderMapper.getOrderNotW0(workorderIds);
}
@Override
@DS("#header.poolName")
public List<BaseProduct> getPackType(String[] workorderIds) {
return proOrderWorkorderMapper.getPackType(workorderIds);
}
@Override
@DS("#header.poolName")
public int deleteWetMaterial(String[] workorderIds) {
@ -1224,7 +1230,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
batch.setBatchCode(batchCode);
batch.setNewBatchCode(newBatchCode);
batch.setStatus("1");//1代表未报工
//batch.setStatus("1");//1代表未报工
batch.setUpdateBy(username);
batch.setUpdateTime(DateUtils.getNowDate());

@ -1122,5 +1122,19 @@
)
order by bom.product_code
</select>
<select id="getPackType" resultType="com.op.plan.domain.BaseProduct">
select
bp.box_type boxType,
bpa.pack_type packType
from pro_order_workorder pow
left join base_product bp on bp.product_code = pow.product_code and bp.del_flag = '0'
left join base_product_attached bpa on concat('0000000',bpa.product_code) = pow.product_code
where pow.workorder_code in
<foreach item="workorderCode" collection="workorderCodes" open="(" separator="," close=")">
#{workorderCode}
</foreach>
and pow.status in ('w0')
and pow.del_flag = '0'
</select>
</mapper>

@ -588,4 +588,10 @@ public class QcCheckTaskIncomeController extends BaseController {
List<QcCheckTaskIncome> rlist = qcCheckTaskIncomeService.getWarehouseList(task);
return rlist;
}
/**检验图片提交**/
@PutMapping(value = "/submitCheckPics")
public AjaxResult submitCheckPics(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) {
return toAjax(qcCheckTaskIncomeService.submitCheckPics(qcCheckTaskIncome));
}
}

@ -5,6 +5,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import com.op.common.core.domain.BaseFileData;
import com.op.quality.domain.*;
import com.op.system.api.domain.SysDictData;
import com.op.system.api.domain.SysNoticeGroup;
@ -163,4 +164,7 @@ public interface QcCheckTaskIncomeMapper {
QcCheckTaskIncome getTaskInfoByRecordId(String recordId);
List<QcCheckTaskIncome> getWarehouseList();
int insertBaseFileBatch(@Param("baseFiles")List<BaseFileData> files);
void deleteBaseFileBySourceId(@Param("sourceId") String sourceId);
}

@ -122,4 +122,6 @@ public interface IQcCheckTaskIncomeService {
List<QcCheckTaskIncome> getWarehouseList(QcCheckTaskIncome task);
List<Map> getCkeckProjectMapList(QcCheckTaskIncome qcCheckTaskIncome);
int submitCheckPics(QcCheckTaskIncome qcCheckTaskIncome);
}

@ -1437,4 +1437,26 @@ public class QcCheckTaskIncomeServiceImpl<QcCheckUnqualifiedService> implements
System.out.println();
}
}
@Override
@DS("#header.poolName")
public int submitCheckPics(QcCheckTaskIncome qcCheckTaskIncome) {
qcCheckTaskIncomeMapper.deleteBaseFileBySourceId(qcCheckTaskIncome.getRecordId());
List<BaseFileData> files = new ArrayList<>();
if (StringUtils.isNotEmpty(qcCheckTaskIncome.getFileList())) {
String[] ids = qcCheckTaskIncome.getFileList().split(",");
BaseFileData file = null;
for (String id : ids) {
file = new BaseFileData();
file.setFileId(IdUtils.fastSimpleUUID());
file.setFileName(id.split("&fileName=")[1]);
file.setFileAddress(id);
file.setSourceId(qcCheckTaskIncome.getRecordId());
file.setCreateBy(SecurityUtils.getUsername());
file.setCreateTime(new Date());
files.add(file);
}
}
return qcCheckTaskIncomeMapper.insertBaseFileBatch(files);
}
}

@ -1317,13 +1317,16 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
.replace("/", "")
.replace("", "")
.replace(",,", ",")
.replace("..", ".")
.replace("\\", "");
List<String> actArray0 = Arrays.asList(actArrayStr.split(","));
List<String> actArray = new ArrayList<>();
for(String avg:actArray0){
if(avg.matches(".*\\..*\\..*")||avg.indexOf(":")>0){
actArray.add(avg.substring(2));
}else{
if(!StringUtils.isEmpty(avg.substring(2))&&!"0".equals(avg.substring(2))){
actArray.add(avg.substring(2));
}
}else if(StringUtils.isNotEmpty(avg)){
actArray.add(avg);
}
}

@ -681,7 +681,7 @@
qct.pgzg,
qct.pgzr,
qct.sfgyswt,
qct.sccj
qct.sccj,qct.cxzz,qct.jgy, qct.pgy
from qc_check_task_cg qct
left join pro_order_workorder pow on pow.workorder_code = qct.order_no and pow.del_flag = '0'
where qct.record_id = #{recordId}
@ -905,5 +905,27 @@
where record_id = #{recordId}
</update>
<insert id="insertBaseFileBatch">
INSERT INTO base_file(file_id, file_name, file_address, source_id, remark, create_by, create_time,image_type)
VALUES
<foreach collection="baseFiles" index="" item="baseFile" separator=",">
(
#{baseFile.fileId},
#{baseFile.fileName},
#{baseFile.fileAddress},
#{baseFile.sourceId},
#{baseFile.remark},
#{baseFile.createBy},
#{baseFile.createTime},
#{baseFile.imageType}
)
</foreach>
</insert>
<delete id="deleteBaseFileBySourceId" parameterType="String">
delete from base_file
where source_id = #{sourceId}
</delete>
</mapper>

Loading…
Cancel
Save