단속자료 수기 입력시 단속팀 정보 갱신 처리 기능 추가

main
이범준 1 year ago
parent ce1f71f13d
commit 81745b7a63

@ -29,7 +29,7 @@ public class CrdnQuery extends CmmnQuery {
private String crdnId;
private String[] crdnIDs;
private String amtDcsnCdGroupId;
private String dtlAmtDcsnCdGroupId;
private String dtlAmtDcsnGroupId;
private String fileLayoutId;
//날짜
@ -417,12 +417,12 @@ public class CrdnQuery extends CmmnQuery {
return self();
}
public String getDtlAmtDcsnCdGroupId() {
return ifEmpty(dtlAmtDcsnCdGroupId, () -> null);
public String getDtlAmtDcsnGroupId() {
return ifEmpty(dtlAmtDcsnGroupId, () -> null);
}
public <T extends CrdnQuery> T setDtlAmtDcsnCdGroupId(String dtlAmtDcsnCdGroupId) {
this.dtlAmtDcsnCdGroupId = dtlAmtDcsnCdGroupId;
public <T extends CrdnQuery> T setDtlAmtDcsnGroupId(String dtlAmtDcsnGroupId) {
this.dtlAmtDcsnGroupId = dtlAmtDcsnGroupId;
return self();
}

@ -26,8 +26,10 @@ import cokr.xit.fims.cmmn.CrdnSttsHstry;
import cokr.xit.fims.cmmn.service.bean.CrdnPayerHstryBean;
import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean;
import cokr.xit.fims.crdn.Crdn;
import cokr.xit.fims.crdn.Team;
import cokr.xit.fims.crdn.dao.CrdnInfoMapper;
import cokr.xit.fims.crdn.dao.CrdnInstMapper;
import cokr.xit.fims.crdn.dao.CrdnTeamMapper;
import cokr.xit.fims.crdn.dao.CrdnUpdtMapper;
import cokr.xit.fims.excl.LevyExcl;
import cokr.xit.fims.excl.service.bean.Excl01Bean;
@ -65,6 +67,10 @@ public class CrdnBean extends AbstractComponent {
@Resource(name = "crdnUpdtMapper")
private CrdnUpdtMapper crdnUpdtMapper;
@Resource(name = "crdnTeamMapper")
private CrdnTeamMapper crdnTeamMapper;
public boolean create(Map<String, Object> nonQueryRequest, Crdn crdn, List<FileInfo> fileInfoList) {
if(fileInfoList != null && !fileInfoList.isEmpty()) {
crdn.setAtchFileCnt(fileInfoList.size());
@ -78,10 +84,24 @@ public class CrdnBean extends AbstractComponent {
crdn.setFfnlgAmt(basicAmt[0]);
crdn.setAdvntceAmt(basicAmt[1]);
//TODO : 단속팀 저장
//if(!ifEmpty(crdn.getTeamId(), () -> "").equals("")) {
//}
//단속팀 정보 갱신
if(!ifEmpty(crdn.getTeamId(), () -> "").equals("")) {
DataObject teamInfo = crdnTeamMapper.selectTeamInfo(crdn.getTeamId());
Team team = new Team();
team.setTaskSeCd(crdn.getTaskSeCd());
team.setSggCd(crdn.getSggCd());
team.setTeamNm(teamInfo.string("TEAM_NM"));
team.setCrdnSeCd(crdn.getCrdnSeCd());
team.setTeamer1(crdn.getTeamer1());
team.setTeamer2(crdn.getTeamer2());
team.setTeamer3(crdn.getTeamer3());
team.setTeamer4(crdn.getTeamer4());
crdnStngBean.saveTeamInfo(true, team);
}
//상태코드 설정
if(ifEmpty(crdn.getCrdnSttsCd(), () -> "").equals("")){ //상태코드가 없을경우
if(ifEmpty(crdn.getCvlcptLinkYn(), () -> "").equals("Y")) { //민원연계자료일 경우
crdn.setCrdnSttsCd("01"); //초기상태
@ -94,6 +114,7 @@ public class CrdnBean extends AbstractComponent {
}
}
//단속 대장 등록
boolean result = this.createLedger(crdn);
if (!result) {
throw new RuntimeException("단속자료 등록 중 단속자료 등록에 실패하였습니다.");

@ -111,7 +111,7 @@ public class CrdnStngBean extends AbstractComponent {
}
}
query.setDtlAmtDcsnCdGroupId("FIM056");
query.setDtlAmtDcsnGroupId("FIM056");
if(Arrays.asList(CAR_GROUP1).contains(ffnlgCarmdlCd)) {
query.setDtlAmtDcsnCd("01");
}
@ -121,7 +121,7 @@ public class CrdnStngBean extends AbstractComponent {
int ffnlgCrdnAmt = Integer.parseInt(ifEmpty(globalStngMapper.selectBasicAmt(query), () -> "0"));
if(ffnlgCrdnAmt > 0 && crdn.getOvtimeYn().equals("Y")) {
if(ffnlgCrdnAmt > 0 && ifEmpty(crdn.getOvtimeYn(), ()-> "").equals("Y")) {
ffnlgCrdnAmt += 10000;
}
@ -169,7 +169,7 @@ public class CrdnStngBean extends AbstractComponent {
if(ffnlgCarmdlCd.equals("21")) {
query.setAmtDcsnCd("01");
query.setDtlAmtDcsnCdGroupId("FIM059");
query.setDtlAmtDcsnGroupId("FIM059");
String vltnNmtm = crdn.getVltnNmtm();
if(vltnNmtm == null || vltnNmtm.equals("") || vltnNmtm.equals("0") || vltnNmtm.equals("1")) {
@ -184,7 +184,7 @@ public class CrdnStngBean extends AbstractComponent {
if(ffnlgCarmdlCd.equals("13") || ffnlgCarmdlCd.equals("14")) {
query.setAmtDcsnCd("02");
query.setDtlAmtDcsnCdGroupId("FIM058");
query.setDtlAmtDcsnGroupId("FIM058");
//query.setDtlAmtDcsnCd(업종); // TODO : 차주 업종
}
;
@ -250,13 +250,13 @@ public class CrdnStngBean extends AbstractComponent {
}
/** .
* @param teamId ID
* @param fromInsertCrdn , teamId ID
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean saveTeamInfo(Team team) {
public boolean saveTeamInfo(boolean fromInsertCrdn, Team team) {
DataObject teamInfo = crdnTeamMapper.selectTeamInfoByName(team);
boolean result = false;
@ -287,9 +287,11 @@ public class CrdnStngBean extends AbstractComponent {
result = crdnTeamMapper.insertTeamInfo(team) == 1 ? true : false;
} else {
if(!fromInsertCrdn) {
team.setTeamId(teamInfo.string("TEAM_ID"));
result = crdnTeamMapper.updateTeamInfo(team) == 1 ? true : false;
}
}
} else {
result = crdnTeamMapper.insertTeamInfo(team) == 1 ? true : false;
}

@ -48,7 +48,7 @@ public class CrdnStngServiceBean extends AbstractServiceBean implements CrdnStng
@Override
public boolean saveTeamInfo(Team team) {
return crdnStngBean.saveTeamInfo(team);
return crdnStngBean.saveTeamInfo(false, team);
}
@Override

@ -105,8 +105,10 @@ UPDATE TB_TEAM_INFO
<select id="selectTeamInfoByName" parameterType="cokr.xit.fims.crdn.Team" resultType="dataobject">
/* 단속팀명으로 단속팀 정보 조회(crdnTeamMapper.selectTeamInfoByName) */
SELECT TEAM_ID
, CRDN_SE_CD
, SGG_CD
, TASK_SE_CD
, TEAM_NM
, CRDN_SE_CD
, TEAMER_1
, TEAMER_2
, TEAMER_3
@ -122,11 +124,15 @@ SELECT TEAM_ID
<select id="selectTeamInfo" parameterType="string" resultType="dataobject">
/* 단속팀 정보 조회(crdnTeamMapper.selectTeamInfo) */
SELECT TEAM_ID
, SGG_CD
, TASK_SE_CD
, TEAM_NM
, CRDN_SE_CD
, TEAMER_1
, TEAMER_2
, TEAMER_3
, TEAMER_4
, ETC_CN
FROM TB_TEAM_INFO
WHERE TEAM_ID = #{teamId}
</select>

@ -37,8 +37,8 @@ SELECT AMT
AND AMT_DCSN_CD_GROUP_ID = #{amtDcsnCdGroupId}
AND AMT_DCSN_CD = #{amtDcsnCd}
</if>
<if test="dtlAmtDcsnCdGroupId != null">
AND DTL_AMT_DCSN_CD_GROUP_ID = #{dtlAmtDcsnCdGroupId}
<if test="dtlAmtDcsnGroupId != null">
AND DTL_AMT_DCSN_GROUP_ID = #{dtlAmtDcsnGroupId}
AND DTL_AMT_DCSN_CD = #{dtlAmtDcsnCd}
</if>
</select>

Loading…
Cancel
Save