直转申请,直转记录查询
This commit is contained in:
parent
dc5343ce48
commit
584f2c40c7
|
|
@ -1,6 +1,8 @@
|
||||||
package com.bonus.material.ma.domain;
|
package com.bonus.material.ma.domain;
|
||||||
|
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
|
@ -9,7 +11,9 @@ import lombok.EqualsAndHashCode;
|
||||||
public class DirectApplyUrl extends BaseEntity {
|
public class DirectApplyUrl extends BaseEntity {
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
public DirectApplyUrl(String s) {
|
@JsonCreator
|
||||||
this.url = s;
|
public DirectApplyUrl(@JsonProperty("url") String url) {
|
||||||
|
this.url = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,9 @@ public class DirectRotationImpl implements DirectRotationService {
|
||||||
if (directApplyInfoDetails != null) {
|
if (directApplyInfoDetails != null) {
|
||||||
if (directApplyInfoDetails.getDirectApplyInfo() != null) {
|
if (directApplyInfoDetails.getDirectApplyInfo() != null) {
|
||||||
DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo();
|
DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo();
|
||||||
|
if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){
|
||||||
|
return AjaxResult.error("申请失败,不能转入同单位同工程");
|
||||||
|
}
|
||||||
directApplyInfos.setCode(workSiteDirectManageService.genderLeaseCode());
|
directApplyInfos.setCode(workSiteDirectManageService.genderLeaseCode());
|
||||||
directApplyInfos.setCreateTime(new Date());
|
directApplyInfos.setCreateTime(new Date());
|
||||||
List<String> urls = new ArrayList<>();
|
List<String> urls = new ArrayList<>();
|
||||||
|
|
@ -95,6 +98,9 @@ public class DirectRotationImpl implements DirectRotationService {
|
||||||
if (directApplyInfoDetails != null) {
|
if (directApplyInfoDetails != null) {
|
||||||
if (directApplyInfoDetails.getDirectApplyInfo() != null && directApplyInfoDetails.getDirectApplyInfo().getId() != null) {
|
if (directApplyInfoDetails.getDirectApplyInfo() != null && directApplyInfoDetails.getDirectApplyInfo().getId() != null) {
|
||||||
DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo();
|
DirectApplyInfo directApplyInfos = directApplyInfoDetails.getDirectApplyInfo();
|
||||||
|
if (directApplyInfos.getBackAgreementId()==directApplyInfos.getLeaseAgreementId()){
|
||||||
|
return AjaxResult.error("申请失败,不能转入同单位同工程");
|
||||||
|
}
|
||||||
directApplyInfos.setUpdateTime(new Date());
|
directApplyInfos.setUpdateTime(new Date());
|
||||||
List<String> urls = new ArrayList<>();
|
List<String> urls = new ArrayList<>();
|
||||||
if (directApplyInfoDetails.getDirectApplyInfo().getDirUrls() != null) {
|
if (directApplyInfoDetails.getDirectApplyInfo().getDirUrls() != null) {
|
||||||
|
|
|
||||||
|
|
@ -333,7 +333,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService {
|
||||||
if (StringUtils.isNotBlank(directApplyInfoDetails.getId())) {
|
if (StringUtils.isNotBlank(directApplyInfoDetails.getId())) {
|
||||||
DirectApplyInfo directApplyInfos = getDirectApplyInfoById(directApplyInfoDetails.getId());
|
DirectApplyInfo directApplyInfos = getDirectApplyInfoById(directApplyInfoDetails.getId());
|
||||||
directApplyInfos.setStatus("1");
|
directApplyInfos.setStatus("1");
|
||||||
directApplyInfos.setAuditor(SecurityUtils.getLoginUser().getUsername());
|
directApplyInfos.setAuditor(SecurityUtils.getUsername());
|
||||||
directApplyInfos.setAuditTime(DateUtils.getNowDate());
|
directApplyInfos.setAuditTime(DateUtils.getNowDate());
|
||||||
res = refuseDirectApplyInfo(directApplyInfos);
|
res = refuseDirectApplyInfo(directApplyInfos);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,41 @@ public class SltAgreementReduceController extends BaseController {
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询协议申请机具名称")
|
||||||
|
// @RequiresPermissions("settlement:apply:list")
|
||||||
|
@GetMapping("/selectByMaType")
|
||||||
|
public AjaxResult selectByMatype(SltAgreementReduce sltAgreement) {
|
||||||
|
List<SltAgreementReduce> list = null;
|
||||||
|
if(sltAgreement!=null){
|
||||||
|
if (sltAgreement.getAgreementId()!=null){
|
||||||
|
list = sltAgreementReduceService.selectByMatype(sltAgreement);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询协议申请机具规格")
|
||||||
|
// @RequiresPermissions("settlement:apply:list")
|
||||||
|
@GetMapping("/selectByMaModel")
|
||||||
|
public AjaxResult selectByMaModel(SltAgreementReduce sltAgreement) {
|
||||||
|
List<SltAgreementReduce> list = null;
|
||||||
|
if(sltAgreement!=null){
|
||||||
|
if (sltAgreement.getAgreementId()!=null){
|
||||||
|
list = sltAgreementReduceService.selectByMaModel(sltAgreement);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return success(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询协议申请减免明细
|
* 查询协议申请减免明细
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,9 @@ public interface SltAgreementReduceMapper {
|
||||||
void insertBatchReduceDetail(@Param("detailList") List<SltAgreementReduce> detailList);
|
void insertBatchReduceDetail(@Param("detailList") List<SltAgreementReduce> detailList);
|
||||||
|
|
||||||
List<SltAgreementReduce> findOverlappingReductions(SltAgreementReduce detail);
|
List<SltAgreementReduce> findOverlappingReductions(SltAgreementReduce detail);
|
||||||
|
|
||||||
|
|
||||||
|
List<SltAgreementReduce> selectByMatype(SltAgreementReduce sltAgreement);
|
||||||
|
|
||||||
|
List<SltAgreementReduce> selectByMaModel(SltAgreementReduce sltAgreement);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,8 @@ public interface ISltAgreementReduceService {
|
||||||
List<SltAgreementReduce> getApplyReduceList(SltAgreementReduce sltAgreement);
|
List<SltAgreementReduce> getApplyReduceList(SltAgreementReduce sltAgreement);
|
||||||
|
|
||||||
AjaxResult addApply(SltAgreementReduce sltAgreement);
|
AjaxResult addApply(SltAgreementReduce sltAgreement);
|
||||||
|
|
||||||
|
List<SltAgreementReduce> selectByMatype(SltAgreementReduce sltAgreement);
|
||||||
|
|
||||||
|
List<SltAgreementReduce> selectByMaModel(SltAgreementReduce sltAgreement);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,16 @@ public class SltAgreementReduceServiceImpl implements ISltAgreementReduceService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SltAgreementReduce> selectByMatype(SltAgreementReduce sltAgreement) {
|
||||||
|
return sltAgreementRecudceMapper.selectByMatype(sltAgreement);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SltAgreementReduce> selectByMaModel(SltAgreementReduce sltAgreement) {
|
||||||
|
return sltAgreementRecudceMapper.selectByMaModel(sltAgreement);
|
||||||
|
}
|
||||||
|
|
||||||
private void initSltAgreement(SltAgreementReduce sltAgreement) {
|
private void initSltAgreement(SltAgreementReduce sltAgreement) {
|
||||||
sltAgreement.setCode(generateCode());
|
sltAgreement.setCode(generateCode());
|
||||||
sltAgreement.setCreateTime(new Date());
|
sltAgreement.setCreateTime(new Date());
|
||||||
|
|
|
||||||
|
|
@ -411,6 +411,11 @@
|
||||||
<select id="getList" resultType="com.bonus.material.ma.domain.DirectApplyInfo">
|
<select id="getList" resultType="com.bonus.material.ma.domain.DirectApplyInfo">
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
dai.*,
|
dai.*,
|
||||||
|
dai.create_time as createTime,
|
||||||
|
dai.back_man as backMan,
|
||||||
|
dai.back_phone as backPhone,
|
||||||
|
dai.lease_man as leaseMan,
|
||||||
|
dai.lease_phone as leasePhone,
|
||||||
bpl.pro_id AS backProId,
|
bpl.pro_id AS backProId,
|
||||||
bpl.pro_name AS backProName,
|
bpl.pro_name AS backProName,
|
||||||
bui.unit_id AS backUnitId,
|
bui.unit_id AS backUnitId,
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND start_time <= #{endTime}
|
AND start_time <= #{endTime}
|
||||||
AND (end_time >= #{startTime} OR end_time IS NULL)
|
AND (end_time >= #{startTime} OR end_time IS NULL)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
<if test="typeId != null">
|
||||||
|
and sai.type_id = #{typeId}
|
||||||
|
|
||||||
|
</if>
|
||||||
) rs
|
) rs
|
||||||
GROUP BY rs.typeId,rs.startTime
|
GROUP BY rs.typeId,rs.startTime
|
||||||
ORDER BY rs.maName
|
ORDER BY rs.maName
|
||||||
|
|
@ -188,4 +193,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
AND end_time >= #{startTime}
|
AND end_time >= #{startTime}
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectByMatype" resultType="com.bonus.material.settlement.domain.SltAgreementReduce">
|
||||||
|
SELECT
|
||||||
|
sai.id,
|
||||||
|
sai.agreement_id as agreementId,
|
||||||
|
mt2.type_id as typeId,
|
||||||
|
mt2.type_name as maName,
|
||||||
|
mt.type_name as maModel,
|
||||||
|
mt.unit_name as maUnit
|
||||||
|
|
||||||
|
FROM
|
||||||
|
slt_agreement_info sai
|
||||||
|
left join ma_type mt on sai.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||||
|
where
|
||||||
|
sai.agreement_id = #{agreementId}
|
||||||
|
group by mt2.type_id
|
||||||
|
</select>
|
||||||
|
<select id="selectByMaModel" resultType="com.bonus.material.settlement.domain.SltAgreementReduce">
|
||||||
|
SELECT
|
||||||
|
sai.id,
|
||||||
|
sai.agreement_id as agreementId,
|
||||||
|
sai.type_id as typeId,
|
||||||
|
mt2.type_name as maName,
|
||||||
|
mt.type_name as maModel,
|
||||||
|
mt.unit_name as maUnit
|
||||||
|
|
||||||
|
FROM
|
||||||
|
slt_agreement_info sai
|
||||||
|
left join ma_type mt on sai.type_id = mt.type_id
|
||||||
|
LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id
|
||||||
|
where
|
||||||
|
sai.agreement_id = #{agreementId} and mt2.type_id = #{typeId}
|
||||||
|
group by mt.type_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue