diff --git a/1 b/1 deleted file mode 100644 index e69de29..0000000 diff --git a/pom.xml b/pom.xml index c21afbc..9a6a57b 100644 --- a/pom.xml +++ b/pom.xml @@ -21,9 +21,9 @@ - + - tallsdk + ptos_sdk com.ccsensptos 0.0.1-SNAPSHOT diff --git a/ptos_serv_ccsens.http b/ptos_serv_ccsens.http new file mode 100644 index 0000000..4f20d48 --- /dev/null +++ b/ptos_serv_ccsens.http @@ -0,0 +1,67 @@ + +### +### login +# @name login +# POST http://localhost:7290/users/signin +POST http://101.201.226.163/gateway/ptostall/users/signin +{{type}} +Authorization: Bearer {{login.response.body.$.data.token}} +deviceId: 66666 + +{ + "client": 0, + "type": 3, + "data": { + "identifier": "zy", + "credential": "123456" + + } +} + +<> 2022-04-27T141611.200.json +<> 2022-04-27T141601.200.json + +### + +GET http://localhost:7320/v1.0/debug +Accept: application/json;charset=UTF-8 + +### + +POST http://localhost:7320/v1.0/deliver/queryChecker +Accept: application/json;charset=UTF-8 +Cache-Control: no-cache +Content-Type: application/json + +{ + "param": { + "projectId": 1 + } +} + +### + +POST http://localhost:7320/v1.0/deliver/saveDeliver +Accept: application/json;charset=UTF-8 +Cache-Control: no-cache +Content-Type: application/json + +{ + "param": { + "projectId": 1, + "taskId": 1, + "deliverName": "测试i交付物" + } +} + +### 查看交付物提交记录 +POST http://localhost:7320/v1.0/deliver/queryCheckLog +{{type}} +Authorization: Bearer {{login.response.body.$.data.token}} + +{ + "param":{ + "deliverRecordId": "1506479764368793600" + } +} + diff --git a/ptos_serv_ccsens.json b/ptos_serv_ccsens.json new file mode 100644 index 0000000..9e585cd --- /dev/null +++ b/ptos_serv_ccsens.json @@ -0,0 +1,5 @@ +{ + "dev": { + "name": "value" + } +} \ No newline at end of file diff --git a/src/main/java/com/ccsens/ptccsens/api/DebugController.java b/src/main/java/com/ccsens/ptccsens/api/DebugController.java index 1d4149f..b9c927b 100644 --- a/src/main/java/com/ccsens/ptccsens/api/DebugController.java +++ b/src/main/java/com/ccsens/ptccsens/api/DebugController.java @@ -66,9 +66,9 @@ public class DebugController { // }); // } // + // }); // } return JsonResponse.newInstance().ok("测试"); } - } diff --git a/src/main/java/com/ccsens/ptccsens/api/DeliverController.java b/src/main/java/com/ccsens/ptccsens/api/DeliverController.java index d7c5e13..87b312f 100644 --- a/src/main/java/com/ccsens/ptccsens/api/DeliverController.java +++ b/src/main/java/com/ccsens/ptccsens/api/DeliverController.java @@ -1,6 +1,5 @@ package com.ccsens.ptccsens.api; - import com.ccsens.ptccsens.annotation.MustLogin; import com.ccsens.ptccsens.bean.dto.DeliverDto; import com.ccsens.ptccsens.bean.vo.DeliverVo; @@ -20,7 +19,6 @@ import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.List; - /** * @author AUSU */ diff --git a/src/main/java/com/ccsens/ptccsens/bean/dto/DeliverDto.java b/src/main/java/com/ccsens/ptccsens/bean/dto/DeliverDto.java index f192761..a36c633 100644 --- a/src/main/java/com/ccsens/ptccsens/bean/dto/DeliverDto.java +++ b/src/main/java/com/ccsens/ptccsens/bean/dto/DeliverDto.java @@ -77,6 +77,8 @@ public class DeliverDto { private List checkerList; @ApiModelProperty("消息id") private String msgId; + @ApiModelProperty("工作量时长") + private Long duration; } @Data @@ -94,6 +96,8 @@ public class DeliverDto { private String remark; @ApiModelProperty("分数") private BigDecimal score; + @ApiModelProperty("检查人认为的工作量时长") + private Long checkDuration; @ApiModelProperty("消息id") private String msgId; } diff --git a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliver.java b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliver.java index c9b68b2..b06b3aa 100644 --- a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliver.java +++ b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliver.java @@ -12,6 +12,8 @@ public class PluDeliver implements Serializable { private String description; + private Long initialDuration; + private Long operator; private Date createdAt; @@ -54,6 +56,14 @@ public class PluDeliver implements Serializable { this.description = description == null ? null : description.trim(); } + public Long getInitialDuration() { + return initialDuration; + } + + public void setInitialDuration(Long initialDuration) { + this.initialDuration = initialDuration; + } + public Long getOperator() { return operator; } @@ -96,6 +106,7 @@ public class PluDeliver implements Serializable { sb.append(", taskSubId=").append(taskSubId); sb.append(", name=").append(name); sb.append(", description=").append(description); + sb.append(", initialDuration=").append(initialDuration); sb.append(", operator=").append(operator); sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); diff --git a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverExample.java b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverExample.java index 0bc6b60..3aef99b 100644 --- a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverExample.java +++ b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverExample.java @@ -365,6 +365,66 @@ public class PluDeliverExample { return (Criteria) this; } + public Criteria andInitialDurationIsNull() { + addCriterion("initial_duration is null"); + return (Criteria) this; + } + + public Criteria andInitialDurationIsNotNull() { + addCriterion("initial_duration is not null"); + return (Criteria) this; + } + + public Criteria andInitialDurationEqualTo(Long value) { + addCriterion("initial_duration =", value, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationNotEqualTo(Long value) { + addCriterion("initial_duration <>", value, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationGreaterThan(Long value) { + addCriterion("initial_duration >", value, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationGreaterThanOrEqualTo(Long value) { + addCriterion("initial_duration >=", value, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationLessThan(Long value) { + addCriterion("initial_duration <", value, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationLessThanOrEqualTo(Long value) { + addCriterion("initial_duration <=", value, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationIn(List values) { + addCriterion("initial_duration in", values, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationNotIn(List values) { + addCriterion("initial_duration not in", values, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationBetween(Long value1, Long value2) { + addCriterion("initial_duration between", value1, value2, "initialDuration"); + return (Criteria) this; + } + + public Criteria andInitialDurationNotBetween(Long value1, Long value2) { + addCriterion("initial_duration not between", value1, value2, "initialDuration"); + return (Criteria) this; + } + public Criteria andOperatorIsNull() { addCriterion("operator is null"); return (Criteria) this; diff --git a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecord.java b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecord.java index fa62903..644577f 100644 --- a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecord.java +++ b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecord.java @@ -12,6 +12,8 @@ public class PluDeliverRecord implements Serializable { private Long memberId; + private Long duration; + private Long operator; private Date createdAt; @@ -54,6 +56,14 @@ public class PluDeliverRecord implements Serializable { this.memberId = memberId; } + public Long getDuration() { + return duration; + } + + public void setDuration(Long duration) { + this.duration = duration; + } + public Long getOperator() { return operator; } @@ -96,6 +106,7 @@ public class PluDeliverRecord implements Serializable { sb.append(", deliverId=").append(deliverId); sb.append(", submitTime=").append(submitTime); sb.append(", memberId=").append(memberId); + sb.append(", duration=").append(duration); sb.append(", operator=").append(operator); sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); diff --git a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordCheckLog.java b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordCheckLog.java index c55b131..4b4dda9 100644 --- a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordCheckLog.java +++ b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordCheckLog.java @@ -17,6 +17,8 @@ public class PluDeliverRecordCheckLog implements Serializable { private Long time; + private Long checkDuration; + private Long operator; private Date createdAt; @@ -75,6 +77,14 @@ public class PluDeliverRecordCheckLog implements Serializable { this.time = time; } + public Long getCheckDuration() { + return checkDuration; + } + + public void setCheckDuration(Long checkDuration) { + this.checkDuration = checkDuration; + } + public Long getOperator() { return operator; } @@ -119,6 +129,7 @@ public class PluDeliverRecordCheckLog implements Serializable { sb.append(", remark=").append(remark); sb.append(", checkStatus=").append(checkStatus); sb.append(", time=").append(time); + sb.append(", checkDuration=").append(checkDuration); sb.append(", operator=").append(operator); sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); diff --git a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordCheckLogExample.java b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordCheckLogExample.java index 792a20b..2f46dfa 100644 --- a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordCheckLogExample.java +++ b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordCheckLogExample.java @@ -476,6 +476,66 @@ public class PluDeliverRecordCheckLogExample { return (Criteria) this; } + public Criteria andCheckDurationIsNull() { + addCriterion("check_duration is null"); + return (Criteria) this; + } + + public Criteria andCheckDurationIsNotNull() { + addCriterion("check_duration is not null"); + return (Criteria) this; + } + + public Criteria andCheckDurationEqualTo(Long value) { + addCriterion("check_duration =", value, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationNotEqualTo(Long value) { + addCriterion("check_duration <>", value, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationGreaterThan(Long value) { + addCriterion("check_duration >", value, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationGreaterThanOrEqualTo(Long value) { + addCriterion("check_duration >=", value, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationLessThan(Long value) { + addCriterion("check_duration <", value, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationLessThanOrEqualTo(Long value) { + addCriterion("check_duration <=", value, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationIn(List values) { + addCriterion("check_duration in", values, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationNotIn(List values) { + addCriterion("check_duration not in", values, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationBetween(Long value1, Long value2) { + addCriterion("check_duration between", value1, value2, "checkDuration"); + return (Criteria) this; + } + + public Criteria andCheckDurationNotBetween(Long value1, Long value2) { + addCriterion("check_duration not between", value1, value2, "checkDuration"); + return (Criteria) this; + } + public Criteria andOperatorIsNull() { addCriterion("operator is null"); return (Criteria) this; diff --git a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordExample.java b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordExample.java index 64bccef..6a85f85 100644 --- a/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordExample.java +++ b/src/main/java/com/ccsens/ptccsens/bean/po/PluDeliverRecordExample.java @@ -345,6 +345,66 @@ public class PluDeliverRecordExample { return (Criteria) this; } + public Criteria andDurationIsNull() { + addCriterion("duration is null"); + return (Criteria) this; + } + + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); + return (Criteria) this; + } + + public Criteria andDurationEqualTo(Long value) { + addCriterion("duration =", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotEqualTo(Long value) { + addCriterion("duration <>", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThan(Long value) { + addCriterion("duration >", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThanOrEqualTo(Long value) { + addCriterion("duration >=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThan(Long value) { + addCriterion("duration <", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThanOrEqualTo(Long value) { + addCriterion("duration <=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationBetween(Long value1, Long value2) { + addCriterion("duration between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotBetween(Long value1, Long value2) { + addCriterion("duration not between", value1, value2, "duration"); + return (Criteria) this; + } + public Criteria andOperatorIsNull() { addCriterion("operator is null"); return (Criteria) this; diff --git a/src/main/java/com/ccsens/ptccsens/bean/vo/DeliverVo.java b/src/main/java/com/ccsens/ptccsens/bean/vo/DeliverVo.java index b391d0c..4abc7b8 100644 --- a/src/main/java/com/ccsens/ptccsens/bean/vo/DeliverVo.java +++ b/src/main/java/com/ccsens/ptccsens/bean/vo/DeliverVo.java @@ -20,6 +20,9 @@ public class DeliverVo { private String deliverId; @ApiModelProperty("交付物名字") private String deliverName; + @ApiModelProperty("交付物默认时长(ms)") + private Long initialDuration; + @ApiModelProperty("交付物提交记录id") private String deliverRecordId; @ApiModelProperty("文件路径") @@ -32,6 +35,9 @@ public class DeliverVo { private String submitMemberName; @ApiModelProperty("检查人列表") private List checkerList; + + @ApiModelProperty("任务执行人选择的交付物时长(ms)") + private Long duration; } @Data @@ -53,6 +59,8 @@ public class DeliverVo { private Byte isMine; @ApiModelProperty("检查时间") private Long checkTime; + @ApiModelProperty("检查人认为时长(ms)") + private Long checkDuration; } @Data @@ -62,6 +70,8 @@ public class DeliverVo { private Long deliverId; @ApiModelProperty("交付物名字") private String deliverName; + @ApiModelProperty("默认工作量时长(ms)") + private Long initialDuration; @ApiModelProperty("交付物提交id") private List deliverRecordList; } @@ -74,6 +84,8 @@ public class DeliverVo { private List details; @ApiModelProperty("提交时间") private Long submitTime; + @ApiModelProperty("任务执行者选择的工作量时长(ms)") + private Long duration; @ApiModelProperty("检查人列表") private List checkerList; } diff --git a/src/main/java/com/ccsens/ptccsens/service/DeliverService.java b/src/main/java/com/ccsens/ptccsens/service/DeliverService.java index 0bf0d92..74019cb 100644 --- a/src/main/java/com/ccsens/ptccsens/service/DeliverService.java +++ b/src/main/java/com/ccsens/ptccsens/service/DeliverService.java @@ -120,6 +120,8 @@ public class DeliverService implements IDeliverService { deliverRecord.setDeliverId(pluDeliver.getId()); deliverRecord.setMemberId(memberIdByUserId); deliverRecord.setSubmitTime(System.currentTimeMillis()); + ////添加duration字段 + deliverRecord.setDuration(param.getDuration()); deliverRecordMapper.insertSelective(deliverRecord); //添加提交的文件信息 if(CollectionUtil.isNotEmpty(param.getFileList())){ @@ -197,6 +199,7 @@ public class DeliverService implements IDeliverService { checkLog.setCheckStatus(param.getType()); checkLog.setRemark(param.getRemark()); checkLog.setScore(param.getScore()); + checkLog.setCheckDuration(param.getCheckDuration()); checkLog.setTime(System.currentTimeMillis()); checkLogMapper.insertSelective(checkLog); //----------------消息------------------------ diff --git a/src/main/resources/mapper_dao/PluDeliverDao.xml b/src/main/resources/mapper_dao/PluDeliverDao.xml index 49e30d0..1910bc5 100644 --- a/src/main/resources/mapper_dao/PluDeliverDao.xml +++ b/src/main/resources/mapper_dao/PluDeliverDao.xml @@ -9,6 +9,8 @@ + + @@ -21,6 +23,7 @@ + @@ -103,9 +106,11 @@ SELECT d.id as deliverId, d.`name` as deliverName, + d.initial_duration as initialDuration, dr.id as deliverRecordId, dr.submit_time as submitTime, dr.member_id as submitMemberId, + dr.duration as duration, m.`name` as submitMemberName FROM t_plu_deliver d @@ -136,7 +141,8 @@ cl.check_status as `status`, cl.remark, cl.score, - cl.time as checkTime + cl.time as checkTime, + cl.check_duration as checkDuration FROM t_plu_deliver_record_check c LEFT JOIN t_plu_deliver_record_check_log cl on c.id = cl.record_check_id and cl.rec_status = 0 @@ -152,9 +158,11 @@ + + @@ -167,6 +175,7 @@ + @@ -182,8 +191,10 @@ SELECT d.id as deliverId, d.`name` as deliverName, + d.initial_duration as initialDuration, dr.id as deliverRecordId, - dr.submit_time as submitTime + dr.submit_time as submitTime, + dr.duration as duration FROM t_plu_deliver d LEFT JOIN t_plu_deliver_record dr on d.id = dr.deliver_id and dr.rec_status = 0 @@ -211,7 +222,8 @@ cl.check_status as `status`, cl.remark, cl.score, - cl.time as checkTime + cl.time as checkTime, + cl.check_duration as checkDuration FROM t_plu_deliver_record_check c LEFT JOIN t_plu_deliver_record_check_log cl on c.id = cl.record_check_id and cl.rec_status = 0 @@ -233,7 +245,8 @@ cl.check_status as `status`, cl.remark, cl.score, - cl.time as checkTime + cl.time as checkTime, + cl.check_duration as checkDuration FROM t_plu_deliver_record_check_log cl LEFT JOIN t_plu_deliver_record_check c on c.id = cl.record_check_id and c.rec_status = 0 diff --git a/src/main/resources/mapper_raw/PluDeliverMapper.xml b/src/main/resources/mapper_raw/PluDeliverMapper.xml index 463c0dc..602d019 100644 --- a/src/main/resources/mapper_raw/PluDeliverMapper.xml +++ b/src/main/resources/mapper_raw/PluDeliverMapper.xml @@ -6,6 +6,7 @@ + @@ -70,7 +71,8 @@ - id, task_sub_id, name, description, operator, created_at, updated_at, rec_status + id, task_sub_id, name, description, initial_duration, operator, created_at, updated_at, + rec_status select @@ -108,12 +109,12 @@ insert into t_plu_deliver_record_check_log (id, record_check_id, score, remark, check_status, time, - operator, created_at, updated_at, - rec_status) + check_duration, operator, created_at, + updated_at, rec_status) values (#{id,jdbcType=BIGINT}, #{recordCheckId,jdbcType=BIGINT}, #{score,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{checkStatus,jdbcType=TINYINT}, #{time,jdbcType=BIGINT}, - #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, - #{recStatus,jdbcType=TINYINT}) + #{checkDuration,jdbcType=BIGINT}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, + #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) insert into t_plu_deliver_record_check_log @@ -136,6 +137,9 @@ time, + + check_duration, + operator, @@ -168,6 +172,9 @@ #{time,jdbcType=BIGINT}, + + #{checkDuration,jdbcType=BIGINT}, + #{operator,jdbcType=BIGINT}, @@ -209,6 +216,9 @@ time = #{record.time,jdbcType=BIGINT}, + + check_duration = #{record.checkDuration,jdbcType=BIGINT}, + operator = #{record.operator,jdbcType=BIGINT}, @@ -234,6 +244,7 @@ remark = #{record.remark,jdbcType=VARCHAR}, check_status = #{record.checkStatus,jdbcType=TINYINT}, time = #{record.time,jdbcType=BIGINT}, + check_duration = #{record.checkDuration,jdbcType=BIGINT}, operator = #{record.operator,jdbcType=BIGINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, @@ -260,6 +271,9 @@ time = #{time,jdbcType=BIGINT}, + + check_duration = #{checkDuration,jdbcType=BIGINT}, + operator = #{operator,jdbcType=BIGINT}, @@ -282,6 +296,7 @@ remark = #{remark,jdbcType=VARCHAR}, check_status = #{checkStatus,jdbcType=TINYINT}, time = #{time,jdbcType=BIGINT}, + check_duration = #{checkDuration,jdbcType=BIGINT}, operator = #{operator,jdbcType=BIGINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, diff --git a/src/main/resources/mapper_raw/PluDeliverRecordMapper.xml b/src/main/resources/mapper_raw/PluDeliverRecordMapper.xml index 4253db4..2c942b5 100644 --- a/src/main/resources/mapper_raw/PluDeliverRecordMapper.xml +++ b/src/main/resources/mapper_raw/PluDeliverRecordMapper.xml @@ -6,6 +6,7 @@ + @@ -70,7 +71,8 @@ - id, deliver_id, submit_time, member_id, operator, created_at, updated_at, rec_status + id, deliver_id, submit_time, member_id, duration, operator, created_at, updated_at, + rec_status