Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
67e780a527
|
|
@ -74,4 +74,13 @@ public class BmContractController extends BaseController {
|
||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "合同模板列表")
|
||||||
|
@GetMapping("/lisTemplate")
|
||||||
|
public AjaxResult lisTemplate(BmContract bmContract) {
|
||||||
|
startPage();
|
||||||
|
List<BmContract> list = bmContractService.lisTemplate(bmContract);
|
||||||
|
return AjaxResult.success(getDataTable(list));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,4 +45,16 @@ public class BmContract {
|
||||||
|
|
||||||
@ApiModelProperty(value = "文件附件")
|
@ApiModelProperty(value = "文件附件")
|
||||||
private List<BmFileInfo> bmFileInfoList;
|
private List<BmFileInfo> bmFileInfoList;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "合同模板所属公司")
|
||||||
|
private Integer companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "0:系统模版 1:用户模版")
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模板内容")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "模板名称")
|
||||||
|
private String templateName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,6 @@ public interface BmContractMapper {
|
||||||
Integer updateStatus(BmContract bmContract);
|
Integer updateStatus(BmContract bmContract);
|
||||||
|
|
||||||
Integer updateStatusOther(BmContract bmContract);
|
Integer updateStatusOther(BmContract bmContract);
|
||||||
|
|
||||||
|
List<BmContract> lisTemplate(BmContract bmContract);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,4 +20,6 @@ public interface BmContractService {
|
||||||
Integer del(BmContract bmContract);
|
Integer del(BmContract bmContract);
|
||||||
|
|
||||||
Integer updateStatus(BmContract bmContract);
|
Integer updateStatus(BmContract bmContract);
|
||||||
|
|
||||||
|
List<BmContract> lisTemplate(BmContract bmContract);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,12 +32,12 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
public List<BmContract> list(BmContract bmContract) {
|
public List<BmContract> list(BmContract bmContract) {
|
||||||
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||||
List<BmContract> list = bmContractMapper.list(bmContract);
|
List<BmContract> list = bmContractMapper.list(bmContract);
|
||||||
for (BmContract contract : list) {
|
/* for (BmContract contract : list) {
|
||||||
BmFileInfo bmFileInfo = new BmFileInfo();
|
BmFileInfo bmFileInfo = new BmFileInfo();
|
||||||
bmFileInfo.setModelId(Long.valueOf(contract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L);
|
bmFileInfo.setModelId(Long.valueOf(contract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L);
|
||||||
List<BmFileInfo> bmFileInfos = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
List<BmFileInfo> bmFileInfos = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo);
|
||||||
contract.setBmFileInfoList(bmFileInfos);
|
contract.setBmFileInfoList(bmFileInfos);
|
||||||
}
|
}*/
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -48,7 +48,7 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||||
bmContract.setStatus(0);
|
bmContract.setStatus(0);
|
||||||
Integer add = bmContractMapper.add(bmContract);
|
Integer add = bmContractMapper.add(bmContract);
|
||||||
if (add > 0) {
|
/* if (add > 0) {
|
||||||
if (bmContract.getBmFileInfoList().size() > 0) {
|
if (bmContract.getBmFileInfoList().size() > 0) {
|
||||||
for (BmFileInfo bmFileInfo : bmContract.getBmFileInfoList()) {
|
for (BmFileInfo bmFileInfo : bmContract.getBmFileInfoList()) {
|
||||||
bmFileInfo.setModelId(Long.valueOf(bmContract.getId()));
|
bmFileInfo.setModelId(Long.valueOf(bmContract.getId()));
|
||||||
|
|
@ -59,7 +59,7 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
return add;
|
return add;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -68,7 +68,7 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid());
|
bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid());
|
||||||
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||||
Integer edit = bmContractMapper.edit(bmContract);
|
Integer edit = bmContractMapper.edit(bmContract);
|
||||||
if (edit > 0) {
|
/* if (edit > 0) {
|
||||||
if (bmContract.getBmFileInfoList().size() > 0) {
|
if (bmContract.getBmFileInfoList().size() > 0) {
|
||||||
BmFileInfo fileInfo = new BmFileInfo();
|
BmFileInfo fileInfo = new BmFileInfo();
|
||||||
fileInfo.setModelId(Long.valueOf(bmContract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L);
|
fileInfo.setModelId(Long.valueOf(bmContract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L);
|
||||||
|
|
@ -82,18 +82,18 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
return edit;
|
return edit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer del(BmContract bmContract) {
|
public Integer del(BmContract bmContract) {
|
||||||
Integer del = bmContractMapper.del(bmContract);
|
Integer del = bmContractMapper.del(bmContract);
|
||||||
if (del > 0) {
|
/* if (del > 0) {
|
||||||
BmFileInfo fileInfo = new BmFileInfo();
|
BmFileInfo fileInfo = new BmFileInfo();
|
||||||
fileInfo.setModelId(Long.valueOf(bmContract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L);
|
fileInfo.setModelId(Long.valueOf(bmContract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L);
|
||||||
bmFileInfoMapper.deleteBmFileInfo(fileInfo);
|
bmFileInfoMapper.deleteBmFileInfo(fileInfo);
|
||||||
}
|
}*/
|
||||||
return del;
|
return del;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -115,6 +115,11 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<BmContract> lisTemplate(BmContract bmContract) {
|
||||||
|
return bmContractMapper.lisTemplate(bmContract);
|
||||||
|
}
|
||||||
|
|
||||||
private String getString() {
|
private String getString() {
|
||||||
//根据前台传过来的数据,生成需求编号
|
//根据前台传过来的数据,生成需求编号
|
||||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ public class DevInfoController extends BaseController {
|
||||||
/**
|
/**
|
||||||
* 设备信息录入--保存草稿--不校验必填
|
* 设备信息录入--保存草稿--不校验必填
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "设备信息录入--保存草稿--不校验必填")
|
@ApiOperation(value = "草稿新增(该接口已废弃)")
|
||||||
@PostMapping("/insertDraft")
|
@PostMapping("/insertDraft")
|
||||||
public AjaxResult insertDraft(@NotNull @RequestBody DevInfo devInfo) {
|
public AjaxResult insertDraft(@NotNull @RequestBody DevInfo devInfo) {
|
||||||
return devInfoService.insertDraft(devInfo);
|
return devInfoService.insertDraft(devInfo);
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.bonus.material.contract.mapper.BmContractMapper">
|
<mapper namespace="com.bonus.material.contract.mapper.BmContractMapper">
|
||||||
<insert id="add" useGeneratedKeys="true" keyProperty="id">
|
<insert id="add" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into bm_contract(contract_code, contract_name, status, create_time, owner_id, owner_com)
|
insert into bm_contract(contract_code, contract_name, status, create_time, owner_id, owner_com, content)
|
||||||
values(#{contractCode}, #{contractName}, #{status}, now(), #{ownerId}, #{ownerCom})
|
values(#{contractCode}, #{contractName}, #{status}, now(), #{ownerId}, #{ownerCom}, #{content})
|
||||||
</insert>
|
</insert>
|
||||||
<update id="edit">
|
<update id="edit">
|
||||||
update bm_contract set
|
update bm_contract set
|
||||||
<if test="contractName != null and contractName != ''">contract_name = #{contractName},</if>
|
<if test="contractName != null and contractName != ''">contract_name = #{contractName},</if>
|
||||||
<if test="status != null">status = #{status},</if>
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="content != null and content !=''">content = #{content},</if>
|
||||||
owner_id = #{ownerId},
|
owner_id = #{ownerId},
|
||||||
owner_com = #{ownerCom},
|
owner_com = #{ownerCom},
|
||||||
update_time = now()
|
update_time = now()
|
||||||
|
|
@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<select id="list" resultType="com.bonus.material.contract.domain.BmContract">
|
<select id="list" resultType="com.bonus.material.contract.domain.BmContract">
|
||||||
select id, contract_code as contractCode, contract_name as contractName, status, create_time as createTime, update_time as updateTime, owner_id as ownerId, owner_com as ownerCom from bm_contract
|
select id, content, contract_code as contractCode, contract_name as contractName, status, create_time as createTime, update_time as updateTime, owner_id as ownerId, owner_com as ownerCom from bm_contract
|
||||||
<where>
|
<where>
|
||||||
owner_com = #{ownerCom}
|
owner_com = #{ownerCom}
|
||||||
<if test="contractCode != null and contractCode != ''">
|
<if test="contractCode != null and contractCode != ''">
|
||||||
|
|
@ -50,4 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
WHERE DATE_FORMAT(create_time, '%y%m') = DATE_FORMAT(#{date}, '%y%m')
|
WHERE DATE_FORMAT(create_time, '%y%m') = DATE_FORMAT(#{date}, '%y%m')
|
||||||
ORDER BY create_time DESC LIMIT 1
|
ORDER BY create_time DESC LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
<select id="lisTemplate" resultType="com.bonus.material.contract.domain.BmContract">
|
||||||
|
select * from bm_contract_template where type = 0
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue