提交修改
This commit is contained in:
parent
ad9b449f99
commit
edd57e3f49
@ -488,10 +488,13 @@ public class ResultRecordController extends AbstractController {
|
||||
BigDecimal checkWeight = NumberUtil.objToBigDecimalDefault(resultDetail.getCheckWeight(), BigDecimal.ZERO);
|
||||
BigDecimal acquireScore = NumberUtil.objToBigDecimalDefault(resultDetail.getAcquireScore(), BigDecimal.ZERO);
|
||||
sum = sum.add(checkWeight.multiply(acquireScore));
|
||||
|
||||
}
|
||||
sum = BigDecimalUtil.setScale(sum, 3);
|
||||
String scoreLevel = resultDetailService.getScoreLevel(sum.doubleValue());
|
||||
resultRecord.setLastScore(sum);
|
||||
resultRecord.setAllScore(sum);
|
||||
resultRecord.setScoreLevel(scoreLevel);
|
||||
resultRecordService.updateResultRecordById(resultRecord);
|
||||
}
|
||||
return R.ok("保存成功").put("recordId", resultRecord.getId());
|
||||
|
||||
@ -11,7 +11,7 @@ import java.util.Date;
|
||||
* 菜单权限表
|
||||
* </p>*业绩记录表
|
||||
* @author quyixiao
|
||||
* @since 2020-08-20
|
||||
* @since 2020-09-15
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -48,12 +48,12 @@ public class ResultRecord implements java.io.Serializable {
|
||||
private String departmentName;
|
||||
//员工姓名
|
||||
private String staffName;
|
||||
|
||||
//当前审批的员工 id
|
||||
private Long currentApprovalStaffId;
|
||||
//当前审批的员工名,以逗号隔开
|
||||
private String currentApprovalStaffName;
|
||||
|
||||
//等级
|
||||
private String scoreLevel;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -130,14 +130,14 @@ public class ResultRecord implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 0.新建,1 提交审批中,2 拒绝
|
||||
* 0.新建,1 提交审批中,2 拒绝, 3 侍提交 ,4 审批通过,5 驳回
|
||||
* @return
|
||||
*/
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
/**
|
||||
* 0.新建,1 提交审批中,2 拒绝
|
||||
* 0.新建,1 提交审批中,2 拒绝, 3 侍提交 ,4 审批通过,5 驳回
|
||||
* @param status
|
||||
*/
|
||||
public void setStatus(Integer status) {
|
||||
@ -241,10 +241,8 @@ public class ResultRecord implements java.io.Serializable {
|
||||
public String getDepartmentId() {
|
||||
return departmentId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工所在部门 id
|
||||
*
|
||||
* 员工所在部门 id
|
||||
* @param departmentId
|
||||
*/
|
||||
public void setDepartmentId(String departmentId) {
|
||||
@ -252,14 +250,12 @@ public class ResultRecord implements java.io.Serializable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工所在部门名称
|
||||
*
|
||||
* 员工所在部门名称
|
||||
* @return
|
||||
*/
|
||||
public String getDepartmentName() {
|
||||
return departmentName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 员工所在部门名称
|
||||
* @param departmentName
|
||||
@ -283,22 +279,51 @@ public class ResultRecord implements java.io.Serializable {
|
||||
this.staffName = staffName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前审批的员工 id
|
||||
* @return
|
||||
*/
|
||||
public Long getCurrentApprovalStaffId() {
|
||||
return currentApprovalStaffId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前审批的员工 id
|
||||
* @param currentApprovalStaffId
|
||||
*/
|
||||
public void setCurrentApprovalStaffId(Long currentApprovalStaffId) {
|
||||
this.currentApprovalStaffId = currentApprovalStaffId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前审批的员工名,以逗号隔开
|
||||
* @return
|
||||
*/
|
||||
public String getCurrentApprovalStaffName() {
|
||||
return currentApprovalStaffName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前审批的员工名,以逗号隔开
|
||||
* @param currentApprovalStaffName
|
||||
*/
|
||||
public void setCurrentApprovalStaffName(String currentApprovalStaffName) {
|
||||
this.currentApprovalStaffName = currentApprovalStaffName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 等级
|
||||
* @return
|
||||
*/
|
||||
public String getScoreLevel() {
|
||||
return scoreLevel;
|
||||
}
|
||||
/**
|
||||
* 等级
|
||||
* @param scoreLevel
|
||||
*/
|
||||
public void setScoreLevel(String scoreLevel) {
|
||||
this.scoreLevel = scoreLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ResultRecord{" +
|
||||
@ -317,9 +342,9 @@ public class ResultRecord implements java.io.Serializable {
|
||||
",departmentId=" + departmentId +
|
||||
",departmentName=" + departmentName +
|
||||
",staffName=" + staffName +
|
||||
",currentApprovalStaffId=" + currentApprovalStaffId +
|
||||
",currentApprovalStaffName=" + currentApprovalStaffName +
|
||||
",scoreLevel=" + scoreLevel +
|
||||
"}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -61,4 +61,6 @@ public interface ResultDetailService extends IService<ResultDetail> {
|
||||
String initRole(Long staffId, Long l);
|
||||
|
||||
List<Step> getStepList(ResultRecord resultRecord);
|
||||
|
||||
String getScoreLevel(double doubleValue);
|
||||
}
|
||||
@ -283,4 +283,26 @@ public class ResultDetailServiceImpl extends ServiceImpl<ResultDetailMapper, Res
|
||||
return stepList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getScoreLevel(double doubleValue) {
|
||||
if(doubleValue < 3.375){
|
||||
return "3.25";
|
||||
}else if(doubleValue < 3.5 ){
|
||||
return "3.5-";
|
||||
}else if (doubleValue < 3.583){
|
||||
return "3.5";
|
||||
}else if (doubleValue < 3.667){
|
||||
return "3.5+";
|
||||
}else if (doubleValue < 3.75){
|
||||
return "3.75-";
|
||||
}else if (doubleValue < 3.875){
|
||||
return "3.75";
|
||||
}else if (doubleValue < 4 ){
|
||||
return "3.75+";
|
||||
}else if (doubleValue == 4 ){
|
||||
return "4";
|
||||
}
|
||||
return "0";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -21,12 +21,13 @@
|
||||
<result column="staff_name" property="staffName"/>
|
||||
<result column="current_approval_staff_id" property="currentApprovalStaffId"/>
|
||||
<result column="current_approval_staff_name" property="currentApprovalStaffName"/>
|
||||
<result column="score_level" property="scoreLevel"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId, type AS type, flow_staff_id_role AS flowStaffIdRole, department_id AS departmentId, department_name AS departmentName, staff_name AS staffName, current_approval_staff_id AS currentApprovalStaffId, current_approval_staff_name AS currentApprovalStaffName
|
||||
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, month_time AS monthTime, status AS status, last_score AS lastScore, all_score AS allScore, remark AS remark, staff_id AS staffId, type AS type, flow_staff_id_role AS flowStaffIdRole, department_id AS departmentId, department_name AS departmentName, staff_name AS staffName, current_approval_staff_id AS currentApprovalStaffId, current_approval_staff_name AS currentApprovalStaffName, score_level AS scoreLevel
|
||||
</sql>
|
||||
|
||||
|
||||
@ -52,6 +53,7 @@
|
||||
<if test="staffName != null">staff_name, </if>
|
||||
<if test="currentApprovalStaffId != null">current_approval_staff_id, </if>
|
||||
<if test="currentApprovalStaffName != null">current_approval_staff_name, </if>
|
||||
<if test="scoreLevel != null">score_level, </if>
|
||||
is_delete,
|
||||
gmt_create,
|
||||
gmt_modified
|
||||
@ -69,6 +71,7 @@
|
||||
<if test="staffName != null">#{ staffName}, </if>
|
||||
<if test="currentApprovalStaffId != null">#{ currentApprovalStaffId}, </if>
|
||||
<if test="currentApprovalStaffName != null">#{ currentApprovalStaffName}, </if>
|
||||
<if test="scoreLevel != null">#{ scoreLevel}, </if>
|
||||
0,
|
||||
now(),
|
||||
now()
|
||||
@ -94,7 +97,8 @@
|
||||
<if test="departmentName != null">department_name = #{departmentName},</if>
|
||||
<if test="staffName != null">staff_name = #{staffName},</if>
|
||||
<if test="currentApprovalStaffId != null">current_approval_staff_id = #{currentApprovalStaffId},</if>
|
||||
<if test="currentApprovalStaffName != null">current_approval_staff_name = #{currentApprovalStaffName}</if>
|
||||
<if test="currentApprovalStaffName != null">current_approval_staff_name = #{currentApprovalStaffName},</if>
|
||||
<if test="scoreLevel != null">score_level = #{scoreLevel}</if>
|
||||
</trim>
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
@ -119,7 +123,8 @@
|
||||
department_name = #{departmentName},
|
||||
staff_name = #{staffName},
|
||||
current_approval_staff_id = #{currentApprovalStaffId},
|
||||
current_approval_staff_name = #{currentApprovalStaffName}
|
||||
current_approval_staff_name = #{currentApprovalStaffName},
|
||||
score_level = #{scoreLevel}
|
||||
,gmt_modified = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
@ -131,6 +136,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectByCondition" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||
select * from lz_result_record where is_delete = 0
|
||||
<if test="req.monthBeginDate != null and req.monthBeginDate != '' ">
|
||||
|
||||
@ -63,7 +63,7 @@ public class MysqlMain {
|
||||
}
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
list.add(new TablesBean("lz_flow_record"));
|
||||
list.add(new TablesBean("lz_result_record"));
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user