yinq 12 months ago
commit d371755a33

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

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

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

@ -1,6 +1,8 @@
package com.aucma.api.mapper;
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 org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
@ -14,13 +16,13 @@ import java.util.List;
@Repository
public interface PdaBindingMapper {
String selectBoxNameByCode(String boxCode);
@DataSource(value = DataSourceType.SLAVE)
int insertBindingInfo(@Param("boxCode") String boxCode,
@Param("boxName") String boxName,
@Param("innerCode")String innerCode);
int countQualityRecordByCode(String code);
@DataSource(value = DataSourceType.SLAVE)
int updateCodeBinding(@Param("boxCode") String boxCode, @Param("innerCode")String innerCode);
int submitRepair(@Param("info")RepairSubmitInfoDto info);

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

Loading…
Cancel
Save