Commit 434d4f9f authored by EDY's avatar EDY

优化

parent ff705e07
......@@ -3,6 +3,7 @@ package com.ruoyi.web.controller.business;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
......@@ -112,6 +113,8 @@ public class BaseContractInfoController extends BaseController {
@Log(title = "合同信息" , businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BaseContractInfo baseContractInfo) {
baseContractInfo.setUpdateTime(new Date());
baseContractInfo.setUpdateBy(getLoginUser().getUser().getNickName());
return toAjax(baseContractInfoService.updateBaseContractInfo(baseContractInfo,getLoginUser().getUser()));
}
......
......@@ -113,7 +113,7 @@ public class BaseContractInfo extends BaseEntity
/** 合同状态 */
@Excel(name = "合同状态")
private Long htzt;
private Integer htzt;
/** 付款方式 */
@Excel(name = "付款方式")
......@@ -404,12 +404,12 @@ public class BaseContractInfo extends BaseEntity
{
return qysj;
}
public void setHtzt(Long htzt)
public void setHtzt(Integer htzt)
{
this.htzt = htzt;
}
public Long getHtzt()
public Integer getHtzt()
{
return htzt;
}
......
......@@ -88,6 +88,9 @@ public class BaseContractInfoServiceImpl implements IBaseContractInfoService {
*/
@Override
public int insertBaseContractInfo(BaseContractInfo baseContractInfo) {
if (baseContractInfo.getKhmc() == null) {
baseContractInfo.setKhmc("/");
}
int result = baseContractInfoMapper.insertBaseContractInfo(baseContractInfo);
baseContractInfo.setCreateTime(DateUtils.getNowDate());
......@@ -119,6 +122,12 @@ public class BaseContractInfoServiceImpl implements IBaseContractInfoService {
public int updateBaseContractInfo(BaseContractInfo baseContractInfo, SysUser user) {
baseContractInfo.setUpdateTime(DateUtils.getNowDate());
if (baseContractInfo.getShzt() != null) {
if (baseContractInfo.getShzt() == 1) {
baseContractInfo.setHtzt(7);
}
if (baseContractInfo.getShzt() == 0) {
baseContractInfo.setHtzt(6);
}
baseContractInfo.setShrId(user.getUserId());
baseContractInfo.setShrName(user.getNickName());
BaseContractAuditRecord baseContractAuditRecord = new BaseContractAuditRecord();
......
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