This commit is contained in:
韩国东 2022-11-30 17:32:24 +08:00
parent 1be58d62e7
commit 7005c0f95f
4 changed files with 25 additions and 18 deletions

View File

@ -27,11 +27,11 @@ public class AddPerformRecordDto {
@NotNull(message = "开始时间不能为空") @NotNull(message = "开始时间不能为空")
@ApiModelProperty(value = "开始时间 yyyy-MM-dd",required = true) @ApiModelProperty(value = "开始时间 yyyy-MM-dd",required = true)
private String startTime; private String starttime;
@NotNull(message = "结束时间不能为空") @NotNull(message = "结束时间不能为空")
@ApiModelProperty(value = "结束时间 yyyy-MM-dd",required = true) @ApiModelProperty(value = "结束时间 yyyy-MM-dd",required = true)
private String endTime; private String endtime;
@NotNull(message = "工作内容不能为空") @NotNull(message = "工作内容不能为空")
@ApiModelProperty(value = "工作内容",required = true) @ApiModelProperty(value = "工作内容",required = true)
@ -72,20 +72,20 @@ public class AddPerformRecordDto {
this.worktitle = worktitle; this.worktitle = worktitle;
} }
public String getStartTime() { public String getStarttime() {
return startTime; return starttime;
} }
public void setStartTime(String startTime) { public void setStarttime(String starttime) {
this.startTime = startTime; this.starttime = starttime;
} }
public String getEndTime() { public String getEndtime() {
return endTime; return endtime;
} }
public void setEndTime(String endTime) { public void setEndtime(String endtime) {
this.endTime = endTime; this.endtime = endtime;
} }
public String getWorkcnt() { public String getWorkcnt() {

View File

@ -594,7 +594,7 @@
nc.CreatedOn, nc.CreatedBy, nc.ModifiedOn, nc.ModifiedBy,nc.PublicTime nc.CreatedOn, nc.CreatedBy, nc.ModifiedOn, nc.ModifiedBy,nc.PublicTime
FROM NewsCnt nc FROM NewsCnt nc
LEFT JOIN NewsClass nl ON nc.`NewsClassId` = nl.`NewsClassId` LEFT JOIN NewsClass nl ON nc.`NewsClassId` = nl.`NewsClassId`
WHERE nc.`NewTitle` LIKE #{} WHERE nc.`NewTitle` LIKE #{condition}
AND nc.`NewsClassId` IS NOT NULL AND nc.`NewsClassId` IS NOT NULL
<if test="null != newsClassId and '' != newsClassId"> <if test="null != newsClassId and '' != newsClassId">
AND nc.`NewsClassId` = #{newsClassId} AND nc.`NewsClassId` = #{newsClassId}

View File

@ -396,7 +396,6 @@
FROM `BaseInClass` bc FROM `BaseInClass` bc
LEFT JOIN BaseInClass sp ON bc.`SuperInId` = sp.`BaseInClassId` LEFT JOIN BaseInClass sp ON bc.`SuperInId` = sp.`BaseInClassId`
WHERE bc.`IndustryClassName` LIKE #{condition} WHERE bc.`IndustryClassName` LIKE #{condition}
and bc.in_type = #{inType}
ORDER BY bc.`IndustryClassName` ASC ORDER BY bc.`IndustryClassName` ASC
</select> </select>

View File

@ -33,6 +33,8 @@ import com.rzyc.model.personal.SysResource;
import com.rzyc.model.user.*; import com.rzyc.model.user.*;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.ConvertUtils;
import org.apache.commons.beanutils.converters.DateConverter;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -80,7 +82,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
SysUser sysUser = sysUserMapper.findBySysUserName(sysusername); SysUser sysUser = sysUserMapper.findBySysUserName(sysusername);
//登录的是政府用户 //登录的是政府用户
if(null != sysUser && StringUtils.isNotBlank(sysUser.getUsertype()) && sysUser.getUsertype().equals("政府用户") & sysUser.getManageState() == IsManage.GOVERNMENT.getState()){ if(null != sysUser && StringUtils.isNotBlank(sysUser.getUsertype()) && sysUser.getUsertype().equals("政府用户")){
String ps = PasswdFactory.encryptPasswd(sysUser.getSysuserid(), sysusername, syspassword); String ps = PasswdFactory.encryptPasswd(sysUser.getSysuserid(), sysusername, syspassword);
System.out.println("========" + ps); System.out.println("========" + ps);
if(sysUser.getSyspassword().equals(ps)){ if(sysUser.getSyspassword().equals(ps)){
@ -449,7 +451,7 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
if(null != sysUser){ if(null != sysUser){
//更新履职进度 //更新履职进度
getFactor(sysUser.getSystitle()); // getFactor(sysUser.getSystitle());
UserDepart userDepart = listPerformMapper.userPerform(sysUser.getSysuserid()); UserDepart userDepart = listPerformMapper.userPerform(sysUser.getSysuserid());
@ -1050,11 +1052,17 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
public SingleResult<String> addPerformRecord(@Valid @RequestBody AddPerformRecordDto addPerformRecordDto)throws Exception{ public SingleResult<String> addPerformRecord(@Valid @RequestBody AddPerformRecordDto addPerformRecordDto)throws Exception{
SingleResult<String> result = new SingleResult<>(); SingleResult<String> result = new SingleResult<>();
ListDetailWithBLOBs listDetail = new ListDetailWithBLOBs(); ListDetailWithBLOBs listDetail = new ListDetailWithBLOBs();
DateConverter converter = new DateConverter();
converter.setPattern(new String("yyyy-MM-dd"));
ConvertUtils.register(converter, Date.class);
BeanUtils.copyProperties(listDetail,addPerformRecordDto); BeanUtils.copyProperties(listDetail,addPerformRecordDto);
//处理时间 //处理时间
listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStartTime(),"yyyy-MM-dd")); listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStarttime(),"yyyy-MM-dd"));
listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndTime(),"yyyy-MM-dd")); listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndtime(),"yyyy-MM-dd"));
listDetail.setFinishtime(listDetail.getEndtime()); listDetail.setFinishtime(listDetail.getEndtime());
String chinaName = getChinaName(); String chinaName = getChinaName();
@ -1128,8 +1136,8 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
BeanUtils.copyProperties(listDetail,addPerformRecordDto); BeanUtils.copyProperties(listDetail,addPerformRecordDto);
//处理时间 //处理时间
listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStartTime(),"yyyy-MM-dd")); listDetail.setStarttime(DateUtils.parseString2Date(addPerformRecordDto.getStarttime(),"yyyy-MM-dd"));
listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndTime(),"yyyy-MM-dd")); listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndtime(),"yyyy-MM-dd"));
listDetail.setFinishtime(listDetail.getEndtime()); listDetail.setFinishtime(listDetail.getEndtime());
String chinaName = getChinaName(); String chinaName = getChinaName();