Merge remote-tracking branch 'origin/master'

# Conflicts:
#	op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java
highway
zhaoxiaolin 1 year ago
commit 203f0456fa

@ -22,7 +22,7 @@ public interface ProOrderWorkorderMapper {
/**
*
*
* @param workorderId
* @param workorderId code
* @return
*/
public ProOrderWorkorder selectProOrderWorkorderByWorkorderId(String workorderId);

@ -590,7 +590,7 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
// 通过班次id查询班次名称
String shiftDesc = proOrderMapper.selectShiftNameById(proOrderWorkorder.getShiftId());
// 通过设备code查询出机型名称
String prodLineName = proOrderMapper.selectProdLineName(proOrderWorkorderMapper.selectProOrderWorkorderByWorkorderId(proOrderWorkorder.getWorkorderId()).getProdLineCode());
String prodLineName = proOrderMapper.selectProdLineName(proOrderWorkorderMapper.selectProOrderWorkorderByWorkorderId(proOrderWorkorder.getWorkorderCode()).getProdLineCode());
// 通过工单id查询批次号
List<String> batchCodeList = proOrderMapper.selectBatchCodesById(proOrderWorkorder.getWorkorderId());
List<StringBuilder> batchCodes = new ArrayList<>();

@ -1,9 +1,6 @@
package com.op.quality.controller;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.domain.R;
import com.op.common.core.utils.uuid.UUID;
import com.op.quality.domain.BaseFile;
import com.op.quality.domain.QcProCheck;
import com.op.quality.service.QcProCheckService;
import com.op.system.api.RemoteMesService;
@ -11,8 +8,6 @@ import com.op.system.api.domain.dto.WCSDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* @ClassName : quaController
* @Description :
@ -28,63 +23,17 @@ public class QuaController {
private RemoteMesService remoteMesService;
@PostMapping("/saveQcProCheck")
public R<Boolean> saveQcProCheck(@RequestBody Map<QcProCheck,BaseFile> map) {
// System.out.println(qcProCheck);
// System.out.println(baseFile);
QcProCheck qcProCheck = map.keySet().iterator().next();
BaseFile baseFile = map.values().iterator().next();
if (!qcProCheck.getFactoryCode().isEmpty()){
if (baseFile==null){
baseFile = new BaseFile();
qcProCheckService.saveQcProCheck(qcProCheck,baseFile);
}
public R<Boolean> saveQcProCheck(@RequestBody QcProCheck qcProCheck) {
if (qcProCheck.getIsqua()=="1"){
System.out.println("调用wcs接口开发转移");
qcProCheckService.saveQcProCheck(qcProCheck);
if (qcProCheck.getIsqua()=="1") {
WCSDTO wcsdto = new WCSDTO();
wcsdto.setFactory(qcProCheck.getFactoryCode());
wcsdto.setRfidNo(qcProCheck.getRfid());
remoteMesService.requestDestinationStations(wcsdto);
return R.ok();
}
else{
return R.fail();
}
}
return R.fail();
}
@PostMapping("/test")
public R<Boolean> test() {
// System.out.println(qcProCheck);
// System.out.println(baseFile);
// QcProCheck qcProCheck = map.keySet().iterator().next();
// BaseFile baseFile = map.values().iterator().next();
QcProCheck qcProCheck = new QcProCheck();
BaseFile baseFile = new BaseFile();
// qcProCheck.setId("1232132132121321");
qcProCheck.setRfid("rfiddddddddddddddddddddddddddddddddddddd");
qcProCheck.setFactoryCode("qewqewqewq");
qcProCheck.setIsqua("1");
baseFile.setFileAddress("qwewqewqewqewqewqq");
if (!qcProCheck.getFactoryCode().isEmpty()){
if (baseFile==null){
baseFile = new BaseFile();
qcProCheckService.saveQcProCheck(qcProCheck,baseFile);
}
else {
qcProCheckService.saveQcProCheck(qcProCheck,baseFile);
}
if (qcProCheck.getIsqua()=="1"){
System.out.println("调用下一个接口");
return R.ok();
}
else{
return R.ok();
}
}
return R.fail();
}
}

@ -0,0 +1,31 @@
package com.op.quality.mapper;
import com.op.common.core.domain.R;
import com.op.quality.domain.QcProCheck;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @ClassName : QuaMapper
* @Description :
* @Author :
* @Date: 2023-08-17 10:40
*/
@Mapper
public interface QcProCheckMapper {
List<QcProCheck> selectQcProCheckList();
int insertQcProCheck(QcProCheck qcProCheck);
int updateQcProCheckById(String rfid);
int deleteQcProCheckById(String rfid);
}

@ -1,132 +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="com.op.quality.mapper.BaseFileMapper">
<resultMap type="BaseFile" id="BaseFileResult">
<result property="fileId" column="file_id" />
<result property="fileName" column="file_name" />
<result property="fileAddress" column="file_address" />
<result property="sourceId" column="source_id" />
<result property="remark" column="remark" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectBaseFileVo">
select file_id, file_name, file_address, source_id, remark, attr1,
attr2, attr3, attr4, create_by, create_time, update_by,
update_time from base_file
</sql>
<select id="selectBaseFileList" parameterType="BaseFile" resultMap="BaseFileResult">
<include refid="selectBaseFileVo"/>
<where>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="fileAddress != null and fileAddress != ''"> and file_address = #{fileAddress}</if>
<if test="sourceId != null and sourceId != ''"> and source_id = #{sourceId}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null "> and attr3 = #{attr3}</if>
<if test="attr4 != null "> and attr4 = #{attr4}</if>
</where>
</select>
<select id="selectBaseFileByFileId" parameterType="String" resultMap="BaseFileResult">
<include refid="selectBaseFileVo"/>
where file_id = #{fileId}
</select>
<select id="getBaseFileBatch" resultMap="BaseFileResult">
<include refid="selectBaseFileVo"/>
where source_id = #{sourceId}
</select>
<insert id="insertBaseFile" parameterType="BaseFile">
insert into base_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fileId != null">file_id,</if>
<if test="fileName != null">file_name,</if>
<if test="fileAddress != null">file_address,</if>
<if test="sourceId != null">source_id,</if>
<if test="remark != null">remark,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fileId != null">#{fileId},</if>
<if test="fileName != null">#{fileName},</if>
<if test="fileAddress != null">#{fileAddress},</if>
<if test="sourceId != null">#{sourceId},</if>
<if test="remark != null">#{remark},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<insert id="insertBaseFileBatch">
INSERT INTO base_file(file_id, file_name, file_address, source_id, remark, create_by, create_time)
VALUES
<foreach collection="baseFiles" index="" item="baseFile" separator=",">
(
#{baseFile.fileId},
#{baseFile.fileName},
#{baseFile.fileAddress},
#{baseFile.sourceId},
#{baseFile.remark},
#{baseFile.createBy},
#{baseFile.createTime}
)
</foreach>
</insert>
<update id="updateBaseFile" parameterType="BaseFile">
update base_file
<trim prefix="SET" suffixOverrides=",">
<if test="fileName != null">file_name = #{fileName},</if>
<if test="fileAddress != null">file_address = #{fileAddress},</if>
<if test="sourceId != null">source_id = #{sourceId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="attr4 != null">attr4 = #{attr4},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where file_id = #{fileId}
</update>
<delete id="deleteBaseFileByFileId" parameterType="String">
delete from base_file where file_id = #{fileId}
</delete>
<delete id="deleteBaseFileByFileIds" parameterType="String">
delete from base_file where file_id in
<foreach item="fileId" collection="array" open="(" separator="," close=")">
#{fileId}
</foreach>
</delete>
<delete id="deleteBaseFileBySourceId">
delete from base_file where source_id = #{sourceId}
</delete>
</mapper>
Loading…
Cancel
Save