添加createTime、creatBy、maxu字段

main
hshansha 2 months ago
parent fdc894feb4
commit fb5e47c603

@ -100,6 +100,7 @@ public class KhEmployeeController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody KhEmployee khEmployee) public AjaxResult add(@RequestBody KhEmployee khEmployee)
{ {
khEmployee.setCreateBy(getUsername());
return khEmployeeService.insertKhEmployee(khEmployee); return khEmployeeService.insertKhEmployee(khEmployee);
} }

@ -115,6 +115,7 @@ public class KhGatherController extends BaseController {
gather.setHzName(hz_name); gather.setHzName(hz_name);
gather.setTableHeader(header.toString()); gather.setTableHeader(header.toString());
gather.setTableData(endTableData.toString()); gather.setTableData(endTableData.toString());
gather.setCreateBy(getUsername());
khGatherService.insertKhGather(gather); khGatherService.insertKhGather(gather);
return AjaxResult.success(); return AjaxResult.success();
} }

@ -78,6 +78,7 @@ public class KhItemsController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody KhItems khItems) public AjaxResult add(@RequestBody KhItems khItems)
{ {
khItems.setCreateBy(getUsername());
return toAjax(khItemsService.insertKhItems(khItems)); return toAjax(khItemsService.insertKhItems(khItems));
} }

@ -85,6 +85,7 @@ public class KhPingceController extends BaseController {
@Transactional @Transactional
@PostMapping @PostMapping
public AjaxResult add(@RequestBody KhPingce khPingce) { public AjaxResult add(@RequestBody KhPingce khPingce) {
khPingce.setCreateBy(getUsername());
khPingceService.insertKhPingce(khPingce); khPingceService.insertKhPingce(khPingce);
//增加关联表 //增加关联表
List<Bkhdx> pcEmps = khPingce.getPcBkhdxs(); List<Bkhdx> pcEmps = khPingce.getPcBkhdxs();

@ -4,6 +4,7 @@ import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.kaohe.domain.KhItems; import com.ruoyi.kaohe.domain.KhItems;
import com.ruoyi.kaohe.domain.KhTemItem; import com.ruoyi.kaohe.domain.KhTemItem;
import com.ruoyi.kaohe.domain.KhVote; import com.ruoyi.kaohe.domain.KhVote;
@ -105,6 +106,8 @@ public class KhTemplateController extends BaseController
@Transactional @Transactional
public AjaxResult add(@RequestBody KhTemplate khTemplate) public AjaxResult add(@RequestBody KhTemplate khTemplate)
{ {
khTemplate.setCreateTime(DateUtils.getNowDate());
khTemplate.setCreateBy(getUsername());
khTemplateService.insertKhTemplate(khTemplate); khTemplateService.insertKhTemplate(khTemplate);
//增加关联表 //增加关联表
List<KhItems> items = khTemplate.getItems(); List<KhItems> items = khTemplate.getItems();

@ -11,36 +11,62 @@ import com.ruoyi.common.core.domain.BaseEntity;
* @author hs * @author hs
* @date 2025-06-17 * @date 2025-06-17
*/ */
public class KhTemItem extends BaseEntity public class KhTemItem extends BaseEntity {
{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 主键ID */ /**
* ID
*/
private Long id; private Long id;
/** 模板名称 */ /**
*
*/
@Excel(name = "模板名称") @Excel(name = "模板名称")
private String temName; private String temName;
/** 考核项id */ /**
* id
*/
@Excel(name = "考核项id") @Excel(name = "考核项id")
private Long khitemId; private Long khitemId;
/** 考核项名称 */ /**
*
*/
@Excel(name = "考核项名称") @Excel(name = "考核项名称")
private String itemName; private String itemName;
/** 模板id */ /**
* id
*/
@Excel(name = "模板id") @Excel(name = "模板id")
private Long temId; private Long temId;
/** 考核类型id */ /**
* id
*/
// @Excel(name = "考核类型id") // @Excel(name = "考核类型id")
private Long typeId; private Long typeId;
/** 考核类型 */ /**
*
*/
@Excel(name = "考核类型") @Excel(name = "考核类型")
private String type; private String type;
/**
*
*/
@Excel(name = "评优最大值")
private Integer umax;
public Integer getUmax() {
return umax;
}
public void setUmax(Integer umax) {
this.umax = umax;
}
public Long getTypeId() { public Long getTypeId() {
return typeId; return typeId;
@ -58,64 +84,57 @@ public class KhTemItem extends BaseEntity
this.type = type; this.type = type;
} }
public void setId(Long id) public void setId(Long id) {
{
this.id = id; this.id = id;
} }
public Long getId() public Long getId() {
{
return id; return id;
} }
public void setTemName(String temName) public void setTemName(String temName) {
{
this.temName = temName; this.temName = temName;
} }
public String getTemName() public String getTemName() {
{
return temName; return temName;
} }
public void setKhitemId(Long khitemId) public void setKhitemId(Long khitemId) {
{
this.khitemId = khitemId; this.khitemId = khitemId;
} }
public Long getKhitemId() public Long getKhitemId() {
{
return khitemId; return khitemId;
} }
public void setItemName(String itemName) public void setItemName(String itemName) {
{
this.itemName = itemName; this.itemName = itemName;
} }
public String getItemName() public String getItemName() {
{
return itemName; return itemName;
} }
public void setTemId(Long temId) public void setTemId(Long temId) {
{
this.temId = temId; this.temId = temId;
} }
public Long getTemId() public Long getTemId() {
{
return temId; return temId;
} }
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId()) .append("id", getId())
.append("temName", getTemName()) .append("temName", getTemName())
.append("khitemId", getKhitemId()) .append("khitemId", getKhitemId())
.append("itemName", getItemName()) .append("itemName", getItemName())
.append("temId", getTemId()) .append("temId", getTemId())
.toString(); .append("typeId", getTypeId())
.append("type", getType())
.append("umax", getUmax())
.toString();
} }
} }

@ -69,6 +69,10 @@ public class KhVote extends BaseEntity
@Excel(name = "最大分数") @Excel(name = "最大分数")
private BigDecimal maxNum; private BigDecimal maxNum;
/** 评优最大值 */
@Excel(name = "评优最大值")
private Integer umax;
/** 评分占比(0-1之间) */ /** 评分占比(0-1之间) */
@Excel(name = "评分占比(0-1之间)") @Excel(name = "评分占比(0-1之间)")
private BigDecimal percentage; private BigDecimal percentage;
@ -92,6 +96,14 @@ public class KhVote extends BaseEntity
*/ */
private List<KhVoteEmp> voteEmps; private List<KhVoteEmp> voteEmps;
public Integer getUmax() {
return umax;
}
public void setUmax(Integer umax) {
this.umax = umax;
}
public String getSamePercent() { public String getSamePercent() {
return samePercent; return samePercent;
} }
@ -269,6 +281,7 @@ public class KhVote extends BaseEntity
.append("sTime", getsTime()) .append("sTime", getsTime())
.append("eTime", geteTime()) .append("eTime", geteTime())
.append("maxNum", getMaxNum()) .append("maxNum", getMaxNum())
.append("umax", getUmax())
.append("percentage", getPercentage()) .append("percentage", getPercentage())
.append("state", getState()) .append("state", getState())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())

@ -159,6 +159,7 @@ public class KhEmployeeServiceImpl implements IKhEmployeeService {
param.setWordId(employee.getWordId()); param.setWordId(employee.getWordId());
List<KhEmployee> e = khEmployeeMapper.selectKhEmployeeList(param); List<KhEmployee> e = khEmployeeMapper.selectKhEmployeeList(param);
if (StringUtils.isNull(e) || e.size() == 0) { if (StringUtils.isNull(e) || e.size() == 0) {
employee.setCreateBy(getUsername());
khEmployeeMapper.insertKhEmployee(employee); khEmployeeMapper.insertKhEmployee(employee);
successNum++; successNum++;
successMsg.append("<br/>" + successNum + "、工号 " + employee.getWordId() + " 导入成功"); successMsg.append("<br/>" + successNum + "、工号 " + employee.getWordId() + " 导入成功");

@ -17,6 +17,8 @@ import org.springframework.stereotype.Service;
import com.ruoyi.kaohe.mapper.KhKhrwResultMapper; import com.ruoyi.kaohe.mapper.KhKhrwResultMapper;
import com.ruoyi.kaohe.service.IKhKhrwResultService; import com.ruoyi.kaohe.service.IKhKhrwResultService;
import static com.ruoyi.common.utils.SecurityUtils.getUsername;
/** /**
* Service * Service
* *
@ -251,10 +253,13 @@ public class KhKhrwResultServiceImpl implements IKhKhrwResultService
pcResult.setTableHeader(children.toJSONString()); pcResult.setTableHeader(children.toJSONString());
pcResult.setTableData(endData.toJSONString()); pcResult.setTableData(endData.toJSONString());
if(isUpdate){ if(isUpdate){
pcResult.setUpdateBy(getUsername());
pcResult.setUpdateTime(DateUtils.getNowDate());
pcResult.setId(pc.getPcResultId()); pcResult.setId(pc.getPcResultId());
this.updateKhKhrwResult(pcResult); this.updateKhKhrwResult(pcResult);
return AjaxResult.success("更新成功"); return AjaxResult.success("更新成功");
}else{ }else{
pcResult.setCreateBy(getUsername());
this.insertKhKhrwResult(pcResult); this.insertKhKhrwResult(pcResult);
return AjaxResult.success("生成成功"); return AjaxResult.success("生成成功");
} }

@ -12,10 +12,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="temId" column="tem_id" /> <result property="temId" column="tem_id" />
<result property="typeId" column="type_id" /> <result property="typeId" column="type_id" />
<result property="type" column="type" /> <result property="type" column="type" />
<result property="umax" column="umax" />
</resultMap> </resultMap>
<sql id="selectKhTemItemVo"> <sql id="selectKhTemItemVo">
select id, tem_name, khitem_id, item_name, tem_id, type_id, type from kh_tem_item select id, tem_name, khitem_id, item_name, tem_id, type_id, type ,umax from kh_tem_item
</sql> </sql>
<select id="selectKhTemItemList" parameterType="KhTemItem" resultMap="KhTemItemResult"> <select id="selectKhTemItemList" parameterType="KhTemItem" resultMap="KhTemItemResult">
@ -27,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="temId != null "> and tem_id = #{temId}</if> <if test="temId != null "> and tem_id = #{temId}</if>
<if test="typeId != null "> and type_id = #{typeId}</if> <if test="typeId != null "> and type_id = #{typeId}</if>
<if test="type != null and type != ''"> and type = #{type}</if> <if test="type != null and type != ''"> and type = #{type}</if>
<if test="umax != null "> and umax = #{umax}</if>
</where> </where>
</select> </select>
@ -44,6 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="temId != null">tem_id,</if> <if test="temId != null">tem_id,</if>
<if test="typeId != null">type_id,</if> <if test="typeId != null">type_id,</if>
<if test="type != null">type,</if> <if test="type != null">type,</if>
<if test="umax != null">umax,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="temName != null and temName != ''">#{temName},</if> <if test="temName != null and temName != ''">#{temName},</if>
@ -52,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="temId != null">#{temId},</if> <if test="temId != null">#{temId},</if>
<if test="typeId != null">#{typeId},</if> <if test="typeId != null">#{typeId},</if>
<if test="type != null">#{type},</if> <if test="type != null">#{type},</if>
<if test="umax != null">#{umax},</if>
</trim> </trim>
</insert> </insert>
@ -64,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="temId != null">tem_id = #{temId},</if> <if test="temId != null">tem_id = #{temId},</if>
<if test="typeId != null">type_id = #{typeId},</if> <if test="typeId != null">type_id = #{typeId},</if>
<if test="type != null">type = #{type},</if> <if test="type != null">type = #{type},</if>
<if test="umax != null">umax = #{umax},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

@ -17,6 +17,7 @@
<result property="sTime" column="s_time" /> <result property="sTime" column="s_time" />
<result property="eTime" column="e_time" /> <result property="eTime" column="e_time" />
<result property="maxNum" column="max_num" /> <result property="maxNum" column="max_num" />
<result property="umax" column="umax" />
<result property="percentage" column="percentage" /> <result property="percentage" column="percentage" />
<result property="state" column="state" /> <result property="state" column="state" />
<result property="samePercent" column="same_percent" /> <result property="samePercent" column="same_percent" />
@ -28,7 +29,7 @@
</resultMap> </resultMap>
<sql id="selectKhVoteVo"> <sql id="selectKhVoteVo">
select id, pingce_id, pingce_name, khitem_id, khitem_name, khitem_typeId, vote_items, vote_title, v_description, s_time, e_time, max_num, percentage, `state`,same_percent, create_by, create_time, update_by, update_time, remark from kh_vote select id, pingce_id, pingce_name, khitem_id, khitem_name, khitem_typeId, vote_items, vote_title, v_description, s_time, e_time, max_num, umax, percentage, `state`,same_percent, create_by, create_time, update_by, update_time, remark from kh_vote
</sql> </sql>
<select id="selectKhVoteList" parameterType="KhVote" resultMap="KhVoteResult"> <select id="selectKhVoteList" parameterType="KhVote" resultMap="KhVoteResult">
@ -45,6 +46,7 @@
<if test="sTime != null "> and s_time = #{sTime}</if> <if test="sTime != null "> and s_time = #{sTime}</if>
<if test="eTime != null "> and e_time = #{eTime}</if> <if test="eTime != null "> and e_time = #{eTime}</if>
<if test="maxNum != null "> and max_num = #{maxNum}</if> <if test="maxNum != null "> and max_num = #{maxNum}</if>
<if test="umax != null "> and umax = #{umax}</if>
<if test="percentage != null "> and percentage = #{percentage}</if> <if test="percentage != null "> and percentage = #{percentage}</if>
<if test="state != null and state != ''"> and state = #{state}</if> <if test="state != null and state != ''"> and state = #{state}</if>
<if test="samePercent != null and samePercent != ''"> and same_percent = #{samePercent}</if> <if test="samePercent != null and samePercent != ''"> and same_percent = #{samePercent}</if>
@ -90,6 +92,7 @@
<if test="sTime != null">s_time,</if> <if test="sTime != null">s_time,</if>
<if test="eTime != null">e_time,</if> <if test="eTime != null">e_time,</if>
<if test="maxNum != null">max_num,</if> <if test="maxNum != null">max_num,</if>
<if test="umax != null">umax,</if>
<if test="percentage != null">percentage,</if> <if test="percentage != null">percentage,</if>
<if test="state != null">state,</if> <if test="state != null">state,</if>
<if test="samePercent != null">same_percent,</if> <if test="samePercent != null">same_percent,</if>
@ -111,6 +114,7 @@
<if test="sTime != null">#{sTime},</if> <if test="sTime != null">#{sTime},</if>
<if test="eTime != null">#{eTime},</if> <if test="eTime != null">#{eTime},</if>
<if test="maxNum != null">#{maxNum},</if> <if test="maxNum != null">#{maxNum},</if>
<if test="umax != null">#{umax},</if>
<if test="percentage != null">#{percentage},</if> <if test="percentage != null">#{percentage},</if>
<if test="state != null">#{state},</if> <if test="state != null">#{state},</if>
<if test="samePercent != null">#{samePercent},</if> <if test="samePercent != null">#{samePercent},</if>
@ -136,6 +140,7 @@
<if test="sTime != null">s_time = #{sTime},</if> <if test="sTime != null">s_time = #{sTime},</if>
<if test="eTime != null">e_time = #{eTime},</if> <if test="eTime != null">e_time = #{eTime},</if>
<if test="maxNum != null">max_num = #{maxNum},</if> <if test="maxNum != null">max_num = #{maxNum},</if>
<if test="umax != null">umax = #{umax},</if>
<if test="percentage != null">percentage = #{percentage},</if> <if test="percentage != null">percentage = #{percentage},</if>
<if test="state != null">state = #{state},</if> <if test="state != null">state = #{state},</if>
<if test="samePercent != null">same_percent = #{samePercent},</if> <if test="samePercent != null">same_percent = #{samePercent},</if>

Loading…
Cancel
Save