Merge remote-tracking branch 'origin/master'
# Conflicts:
# inspect-server/src/main/java/com/yuanchu/mom/service/RawInspectService.java
| | |
| | | </if> |
| | | <if test="message!=null and message!=''"> |
| | | and code like concat('%',#{message},'%') |
| | | or name like concat('%',#{message},'%') |
| | | or device.name like concat('%',#{message},'%') |
| | | </if> |
| | | </select> |
| | | <!--根据设备分组查询设备--> |
| | |
| | | where e.id = et.element_id |
| | | and t.id = tech_tem_id |
| | | and t.state = 1 |
| | | and et.state=1 |
| | | and type=#{type} |
| | | <if test="message!=null and message!=''"> |
| | | and father like concat('%',#{message},'%') |
| | |
| | | rawInsProductService.updaterawInsProduct(userId,rpId,testValue,devId); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "更改设备") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "rpId", value = "原材料检验项目id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "DevId", value = "设备id", dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @PostMapping("/updateDevByRpId") |
| | | public Result updateDevByRpId(Integer rpId ,Integer devId) { |
| | | rawInsProductService.updateDevByRpId(rpId,devId); |
| | | return Result.success(); |
| | | } |
| | | } |
| | | |
| | |
| | | void updaterawInsProduct(int userId, Integer rpId ,String testValue,Integer devId); |
| | | |
| | | |
| | | /** |
| | | * 只更改设备,之前的检验值删掉 |
| | | * @param rpId |
| | | * @param devId |
| | | */ |
| | | void updateDevByRpId(Integer rpId, Integer devId); |
| | | } |
| | | |
| | |
| | | import com.yuanchu.mom.pojo.RawInspect; |
| | | import com.yuanchu.mom.service.RawInsProductService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | |
| | | rawInspectMapper.updateById(rawInspect); |
| | | } |
| | | |
| | | //只更改设备,之前的检验值删掉 |
| | | @Override |
| | | public void updateDevByRpId(Integer rpId, Integer devId) { |
| | | RawInsProduct rawInsProduct = new RawInsProduct(); |
| | | rawInsProduct.setId(rpId); |
| | | rawInsProduct.setDeviceId(devId); |
| | | rawInsProduct.setTestValue(null); |
| | | rawInsProduct.setTestState(null); |
| | | rawInsProductMapper.updateById(rawInsProduct); |
| | | } |
| | | |
| | | /*判断检测值是否满足标准值和内控值的要求,如果不满足则检验结论为不合格*/ |
| | | private int checkValues(String standardValueStr, String controlValueStr, String detectionValueStr) { |
| | | boolean isStandardValueSatisfied = isValueSatisfied(standardValueStr, detectionValueStr); |
| | |
| | | <resultMap id="oneMap" type="map"> |
| | | <id property="rcode" column="rcode"/> |
| | | <result property="formTime" column="formTime"/> |
| | | <result property="creatTime" column="creatTime"/> |
| | | <result property="rname" column="rname"/> |
| | | <result property="specifications" column="specifications"/> |
| | | <result property="runit" column="runit"/> |
| | |
| | | specifications, |
| | | r.unit runit, |
| | | number, |
| | | DATE_FORMAT(r.create_time, '%Y-%m-%d') creatTime, |
| | | supplier, |
| | | judge_state, |
| | | user_name, |
| | |
| | | @PostMapping("/compile") |
| | | public Result compile(Integer id) { |
| | | ordersService.compile(id); |
| | | return Result.success("编制产品"+id+"完成!"); |
| | | return Result.success("编制产品完成!"); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | <!--右侧数据展示 工艺路线--> |
| | | <resultMap id="selectAllTecMap" type="map"> |
| | | <id property="name" column="father"/> |
| | | <id property="father" column="father"/> |
| | | <collection property="children" resultMap="selectAllTecMaps" javaType="List"/> |
| | | </resultMap> |
| | | <resultMap id="selectAllTecMaps" type="map"> |