Commit 692e01ea by lijingjing

部分功能优化;

parent 8b321b28
...@@ -226,7 +226,7 @@ public class EntrustController extends ServiceController { ...@@ -226,7 +226,7 @@ public class EntrustController extends ServiceController {
entrust.setNotSampleStatus(EntrustSampleStatusEnum.DRAFT); entrust.setNotSampleStatus(EntrustSampleStatusEnum.DRAFT);
entrust.setGroupNameList(userInfoService.getCurGroupNameList()); entrust.setGroupNameList(userInfoService.getCurGroupNameList());
// 涉及到检测人的数据 // 涉及到检测人的数据
entrust.setTesterId(getAccount().getUserId()); // entrust.setTesterId(getAccount().getUserId());
return success(entrustService.pageEntrustByNotSample(getPage(), entrust)); return success(entrustService.pageEntrustByNotSample(getPage(), entrust));
} }
......
...@@ -214,6 +214,16 @@ public class EntrustSampleController extends ServiceController { ...@@ -214,6 +214,16 @@ public class EntrustSampleController extends ServiceController {
} }
@ApiOperation("根据 id 修改信息") @ApiOperation("根据 id 修改信息")
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "主键", required = true, paramType = "path", dataTypeClass = Long.class),
})
@PutMapping("/edit/{id}")
public RestResult<Boolean> editSample(@PathVariable("id") Long id, EntrustSample entrustSample) {
entrustSample.setId(id);
return success(entrustSampleService.updateById(entrustSample));
}
@ApiOperation("根据 id 修改信息")
@PutMapping("/edit_sample") @PutMapping("/edit_sample")
public RestResult<Boolean> editSample(EntrustSample entrustSample, String source) { public RestResult<Boolean> editSample(EntrustSample entrustSample, String source) {
return success(entrustSampleService.updateSample(entrustSample, source, getAccount())); return success(entrustSampleService.updateSample(entrustSample, source, getAccount()));
......
...@@ -130,6 +130,9 @@ ...@@ -130,6 +130,9 @@
SELECT SELECT
s.company_id,s.entrust_id,max(s.sample_from) "sample_from" s.company_id,s.entrust_id,max(s.sample_from) "sample_from"
from entrust_sample s where s.deleted = 0 from entrust_sample s where s.deleted = 0
<if test="null != vo.sampleCode">
and s.code like concat('%',#{vo.sampleCode},'%')
</if>
<if test="null != vo.sampleStatus"> <if test="null != vo.sampleStatus">
and s.status = #{vo.sampleStatus} and s.status = #{vo.sampleStatus}
</if> </if>
......
...@@ -7,11 +7,12 @@ ...@@ -7,11 +7,12 @@
SELECT SELECT
p.id, p.entrust_sample_id,s.code "code",s.name,s.product_code,s.product_basis_name,s.compose_judge,s.product_standard_id,s.name_code, p.id, p.entrust_sample_id,s.code "code",s.name,s.product_code,s.product_basis_name,s.compose_judge,s.product_standard_id,s.name_code,
s.compliance_test,p.group_id,p.group_name,p.make_type,p.make_quantity,p.store_way,p.store_location,p.maker,p.make_time, s.compliance_test,p.group_id,p.group_name,p.make_type,p.make_quantity,p.store_way,p.store_location,p.maker,p.make_time,
s.first_code,s.second_code,s.third_code s.first_code,s.second_code,s.third_code,e.entrust_time
FROM FROM
entrust_sample_prepare entrust_sample_prepare P
P JOIN entrust_sample s ON P.entrust_sample_id = s.ID JOIN entrust_sample s ON P.entrust_sample_id = s.ID AND s.deleted = 0
WHERE s.deleted = 0 AND p.deleted = 0 JOIN entrust e ON e.id = s.entrust_id and e.deleted = 0
WHERE p.deleted = 0
<if test="null!=vo.entrustSampleId"> <if test="null!=vo.entrustSampleId">
AND p.entrust_sample_id = #{vo.entrustSampleId} AND p.entrust_sample_id = #{vo.entrustSampleId}
</if> </if>
......
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
</if> </if>
</sql> </sql>
<!--原铝品台账查询--> <!--原铝品台账查询-->
<select id="selectAlGradeLedger" resultType="com.patzn.cloud.service.hmhj.vo.DailyStatsLedgerVO"> <select id="selectAlGradeLedger" resultType="com.patzn.cloud.service.hmhj.vo.DailyStatsLedgerVO">
SELECT SELECT
s.slot_no "label", s.slot_no "label",
...@@ -313,7 +313,7 @@ ...@@ -313,7 +313,7 @@
s.sample_grading "value" s.sample_grading "value"
FROM FROM
entrust_sample s entrust_sample s
JOIN electrolyzer e on e.id = s.electrolyzer_id JOIN electrolyzer e on e.id = s.electrolyzer_id and e.deleted = 0
JOIN ( JOIN (
SELECT SELECT
i.entrust_sample_id, i.entrust_sample_id,
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
i.entrust_sample_id i.entrust_sample_id
) i ON i.entrust_sample_id = s.ID ) i ON i.entrust_sample_id = s.ID
WHERE WHERE
s.deleted = 0 and e.deleted = 0 s.deleted = 0
AND s.NAME = '原铝' AND s.NAME = '原铝'
AND s.sample_grading IS NOT NULL AND s.sample_grading IS NOT NULL
AND i.test_time LIKE '${vo.yearMonth}%' AND i.test_time LIKE '${vo.yearMonth}%'
......
/** created by meazty on 2021/10/8 15:50 **/
/** created by meazty on 2021/10/8 15:50 **/
-- 委托样品 --
ALTER TABLE "public"."entrust_sample"
ADD COLUMN "conclusion" varchar(64) COLLATE "pg_catalog"."default";
COMMENT ON COLUMN "public"."entrust_sample"."conclusion" IS '验收结论';
-- 资质项目 --
ALTER TABLE "public"."qualification"
ADD COLUMN "judge_standard" varchar(120) COLLATE "pg_catalog"."default";
COMMENT ON COLUMN "public"."qualification"."judge_standard" IS '判定标准';
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment