yinq 11 months ago
commit d371755a33

@ -23,8 +23,8 @@ spring:
basename: i18n/messages basename: i18n/messages
# 运行环境 # 运行环境
profiles: profiles:
active: local # active: local
# active: dev active: dev
# active: prod # active: prod

@ -68,8 +68,8 @@ public class PdaApiController {
public AjaxResult checkSelect(String code) { public AjaxResult checkSelect(String code) {
String boxName = service.selectBoxNameByCode(code); String boxName = service.selectBoxNameByCode(code);
if (boxName == null) { if (boxName == null) {
boxName = "固定数据"; // boxName = "固定数据";
// return error("箱壳条码扫描错误"); return error("箱壳条码扫描错误");
} }
List<ReportQualityInspection> list = service.checkSelectRepairInfo(code); List<ReportQualityInspection> list = service.checkSelectRepairInfo(code);
return success(boxName, list); return success(boxName, list);
@ -92,11 +92,13 @@ public class PdaApiController {
inspection.setInspectorCode(checkInfo.getUserName()); inspection.setInspectorCode(checkInfo.getUserName());
inspection.setInspectorTime(new Date()); inspection.setInspectorTime(new Date());
inspection.setStationCode(checkInfo.getStationCode()); inspection.setStationCode(checkInfo.getStationCode());
inspection.setGroupCode(checkInfo.getTeamName());
assert list != null; assert list != null;
if (!list.isEmpty()) { if (!list.isEmpty()) {
CheckInfoDto.DefectBeen defectBeen = list.get(i); CheckInfoDto.DefectBeen defectBeen = list.get(i);
inspection.setSubmitQualtyId(defectBeen.getObjId()); inspection.setSubmitQualtyId(defectBeen.getObjId());
inspection.setTestItemCode(list.get(i).getStationCode()); inspection.setTestItemCode(list.get(i).getStationCode());
inspection.setQualityDefectCode(list.get(i).getQualityDefectCode()); inspection.setQualityDefectCode(list.get(i).getQualityDefectCode());
inspection.setQualityDefectName(list.get(i).getQualityDefectName()); inspection.setQualityDefectName(list.get(i).getQualityDefectName());
} }

@ -13,11 +13,19 @@ public class CheckInfoDto {
private List<DefectBeen> list;//缺陷列表 private List<DefectBeen> list;//缺陷列表
private String stationCode; private String stationCode;
private String userName; private String userName;
private String teamName;
public String getMeasure() { public String getMeasure() {
return measure; return measure;
} }
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public void setMeasure(String measure) { public void setMeasure(String measure) {
this.measure = measure; this.measure = measure;
} }

@ -1,6 +1,8 @@
package com.aucma.api.mapper; package com.aucma.api.mapper;
import com.aucma.api.domain.dto.RepairSubmitInfoDto; import com.aucma.api.domain.dto.RepairSubmitInfoDto;
import com.aucma.common.annotation.DataSource;
import com.aucma.common.enums.DataSourceType;
import com.aucma.report.domain.ReportQualityInspection; import com.aucma.report.domain.ReportQualityInspection;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@ -14,13 +16,13 @@ import java.util.List;
@Repository @Repository
public interface PdaBindingMapper { public interface PdaBindingMapper {
String selectBoxNameByCode(String boxCode); String selectBoxNameByCode(String boxCode);
@DataSource(value = DataSourceType.SLAVE)
int insertBindingInfo(@Param("boxCode") String boxCode, int insertBindingInfo(@Param("boxCode") String boxCode,
@Param("boxName") String boxName, @Param("boxName") String boxName,
@Param("innerCode")String innerCode); @Param("innerCode")String innerCode);
int countQualityRecordByCode(String code); int countQualityRecordByCode(String code);
@DataSource(value = DataSourceType.SLAVE)
int updateCodeBinding(@Param("boxCode") String boxCode, @Param("innerCode")String innerCode); int updateCodeBinding(@Param("boxCode") String boxCode, @Param("innerCode")String innerCode);
int submitRepair(@Param("info")RepairSubmitInfoDto info); int submitRepair(@Param("info")RepairSubmitInfoDto info);

@ -6,15 +6,15 @@
<select id="selectBoxNameByCode" resultType="string"> <select id="selectBoxNameByCode" resultType="string">
select MATERIAL_NAME from AUCMA_MES.BASE_MATERIALINFO where MATERIAL_CODE = #{boxCode} select MATERIAL_NAME from BASE_MATERIALINFO where MATERIAL_CODE = #{boxCode}
</select> </select>
<insert id="insertBindingInfo"> <insert id="insertBindingInfo">
INSERT INTO AUCMA_SCADA.CODE_BINDING(OBJ_ID, BOX_CODE, BOX_NAME, LINER_CODE, BINDING_RESULT, RECORD_TIME1) INSERT INTO CODE_BINDING(OBJ_ID, BOX_CODE, BOX_NAME, LINER_CODE, BINDING_RESULT, RECORD_TIME1)
VALUES (AUCMA_SCADA.SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE) VALUES (SEQ_CODE_BINDING.nextval, #{boxCode}, #{boxName}, #{innerCode}, '成功', SYSDATE)
</insert> </insert>
<update id="updateCodeBinding"> <update id="updateCodeBinding">
UPDATE AUCMA_SCADA.CODE_BINDING UPDATE CODE_BINDING
SET PRODUCT_CODE = #{innerCode}, BINDING_RESULT = '成功',RECORD_TIME2 = SYSDATE,IS_PASS= 1 SET PRODUCT_CODE = #{innerCode}, BINDING_RESULT = '成功',RECORD_TIME2 = SYSDATE,IS_PASS= 1
where BOX_CODE = #{boxCode} where BOX_CODE = #{boxCode}
</update> </update>
@ -22,11 +22,11 @@
<select id="countQualityRecordByCode" resultType="int"> <select id="countQualityRecordByCode" resultType="int">
select count(OBJ_ID) select count(OBJ_ID)
from AUCMA_MES.REPORT_QUALITY_INSPECTION from REPORT_QUALITY_INSPECTION
where BAR_CODE = #{code} and IS_FLAG !=1 where BAR_CODE = #{code} and IS_FLAG !=1
</select> </select>
<update id="submitRepair" parameterType="com.aucma.api.domain.dto.RepairSubmitInfoDto"> <update id="submitRepair" parameterType="com.aucma.api.domain.dto.RepairSubmitInfoDto">
UPDATE AUCMA_MES.REPORT_QUALITY_INSPECTION UPDATE REPORT_QUALITY_INSPECTION
SET PROCESS_RESULT = #{info.repairName}, SET PROCESS_RESULT = #{info.repairName},
REWORK_NUMBER = 1, REWORK_NUMBER = 1,
FINISH_TIME = sysdate, FINISH_TIME = sysdate,
@ -44,7 +44,7 @@
MATERIAL_NAME, MATERIAL_NAME,
QUALITY_DEFECT_CODE, QUALITY_DEFECT_CODE,
QUALITY_DEFECT_NAME QUALITY_DEFECT_NAME
from AUCMA_MES.REPORT_QUALITY_INSPECTION from REPORT_QUALITY_INSPECTION
where BAR_CODE = #{code} where BAR_CODE = #{code}
and IS_FLAG is null and IS_FLAG is null
</select> </select>
@ -54,7 +54,7 @@
TEST_ITEM_CODE as STATION_CODE, TEST_ITEM_CODE as STATION_CODE,
QUALITY_DEFECT_CODE, QUALITY_DEFECT_CODE,
QUALITY_DEFECT_NAME QUALITY_DEFECT_NAME
from AUCMA_MES.REPORT_QUALITY_INSPECTION from REPORT_QUALITY_INSPECTION
where BAR_CODE = #{code} where BAR_CODE = #{code}
and IS_FLAG = 1 and IS_FLAG=1 and IS_FLAG = 1 and IS_FLAG=1
</select> </select>

Loading…
Cancel
Save