단속 관리 수정
parent
3f21f9df1b
commit
ea42b3d58c
@ -1,28 +0,0 @@
|
|||||||
package cokr.xit.fims.crdn.service.bean;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import cokr.xit.fims.crdn.CrdnQuery;
|
|
||||||
import cokr.xit.fims.crdn.service.CrdnService;
|
|
||||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
|
||||||
import cokr.xit.foundation.data.DataObject;
|
|
||||||
|
|
||||||
/**민원 개별 등록 서비스 인터페이스의 구현체
|
|
||||||
* @author leebj
|
|
||||||
*/
|
|
||||||
@Service("crdn02Service")
|
|
||||||
public class Crdn02ServiceBean extends AbstractServiceBean implements CrdnService {
|
|
||||||
|
|
||||||
/** 민원 개별 등록 Bean */
|
|
||||||
@Resource(name="crdn02Bean")
|
|
||||||
protected Crdn02Bean crdn02Bean;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<DataObject> getCrackdownList(CrdnQuery req) {
|
|
||||||
return null; //crdn02Mapper.
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,131 +0,0 @@
|
|||||||
package cokr.xit.fims.crdn.service.bean;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import cokr.xit.base.file.FileInfo;
|
|
||||||
import cokr.xit.base.file.service.bean.FileBean;
|
|
||||||
import cokr.xit.base.file.web.FileInfoFactory;
|
|
||||||
import cokr.xit.fims.cmmn.CrdnSttsHstry;
|
|
||||||
import cokr.xit.fims.cmmn.service.bean.CrdnSttsHstryBean;
|
|
||||||
import cokr.xit.fims.crdn.Crdn;
|
|
||||||
import cokr.xit.fims.crdn.CrdnQuery;
|
|
||||||
import cokr.xit.fims.crdn.dao.Crdn05Mapper;
|
|
||||||
import cokr.xit.fims.crdn.service.CrdnService;
|
|
||||||
import cokr.xit.fims.excl.Excl01;
|
|
||||||
import cokr.xit.fims.excl.service.bean.Excl01Bean;
|
|
||||||
import cokr.xit.foundation.UserInfo;
|
|
||||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
|
||||||
import cokr.xit.foundation.data.DataObject;
|
|
||||||
|
|
||||||
/**단속 자료 등록 서비스 인터페이스의 구현체
|
|
||||||
* @author leebj
|
|
||||||
*/
|
|
||||||
@Service("crdn05Service")
|
|
||||||
public class Crdn05ServiceBean extends AbstractServiceBean implements CrdnService {
|
|
||||||
|
|
||||||
@Resource(name="crdn05Mapper")
|
|
||||||
protected Crdn05Mapper crdn05Mapper;
|
|
||||||
|
|
||||||
/** 단속 자료 등록 Bean */
|
|
||||||
@Resource(name="crdn05Bean")
|
|
||||||
protected Crdn05Bean crdn05Bean;
|
|
||||||
|
|
||||||
@Resource(name="fileBean")
|
|
||||||
private FileBean fileBean;
|
|
||||||
|
|
||||||
@Resource(name="excl01Bean")
|
|
||||||
private Excl01Bean excl01Bean;
|
|
||||||
|
|
||||||
@Resource(name="crdnSttsHstryBean")
|
|
||||||
private CrdnSttsHstryBean crdnSttsHstryBean;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<DataObject> getCrackdownList(CrdnQuery req) {
|
|
||||||
req.setCurrentUserId(currentUser().getId());
|
|
||||||
req.setOrderBy("CRDN_ID");
|
|
||||||
return crdn05Mapper.selectCrackdownList(req);
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean create(Crdn crdn, MultipartFile[] newFileList) {
|
|
||||||
List<FileInfo> fileInfoList = new ArrayList<FileInfo>();
|
|
||||||
if(newFileList != null) {
|
|
||||||
fileInfoList = new FileInfoFactory().makeFileInfos(null, newFileList);
|
|
||||||
crdn.setAtchFileCnt(fileInfoList.size());
|
|
||||||
} else {
|
|
||||||
crdn.setAtchFileCnt(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int[] basicAmt = crdn05Bean.getBasicAmt(crdn);
|
|
||||||
|
|
||||||
crdn.setFfnlgAmt(basicAmt[0]);
|
|
||||||
crdn.setLevyAmt(basicAmt[0]);
|
|
||||||
crdn.setAdvntceLevyAmt(basicAmt[1]);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(ifEmpty(crdn.getDoGuidance(), () -> "").equals("on")) {
|
|
||||||
crdn.setCrdnSttsCd("83");
|
|
||||||
} else {
|
|
||||||
crdn.setCrdnSttsCd("01");
|
|
||||||
}
|
|
||||||
|
|
||||||
crdn.setInstitute(UserInfo.current().getInstitute());
|
|
||||||
boolean result = crdn05Bean.insertCrdn(crdn);
|
|
||||||
|
|
||||||
SimpleDateFormat yyyyMMdd = new SimpleDateFormat("yyyyMMdd");
|
|
||||||
Date curTime = new Date();
|
|
||||||
String strCurrentDate = yyyyMMdd.format(curTime);
|
|
||||||
|
|
||||||
String taskDtlId = crdn.getCrdnId();
|
|
||||||
|
|
||||||
if(crdn.getCrdnSttsCd().equals("83")) {
|
|
||||||
// 부과제외(TB_LEVY_EXCL) 대장 등록
|
|
||||||
Excl01 excl01 = new Excl01();
|
|
||||||
excl01.setSggCd(""); // TODO:시군구
|
|
||||||
excl01.setTaskSeCd(crdn.getTaskSeCd());
|
|
||||||
excl01.setCrdnId(crdn.getCrdnId());
|
|
||||||
excl01.setLevyExclYmd(strCurrentDate);
|
|
||||||
excl01.setLevyExclSeCd("2");
|
|
||||||
excl01.setLevyExclRsnCd("192");
|
|
||||||
excl01.setEtcCn("");
|
|
||||||
|
|
||||||
result = excl01Bean.create(excl01);
|
|
||||||
if (!result) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
taskDtlId = excl01.getLevyExclId();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 단속상태이력(TB_CRDN_STTS_HSTRY) 대장 등록
|
|
||||||
CrdnSttsHstry crdnSttsHstry = new CrdnSttsHstry();
|
|
||||||
crdnSttsHstry.setCrdnId(crdn.getCrdnId());
|
|
||||||
crdnSttsHstry.setBfrSttsCd("");
|
|
||||||
crdnSttsHstry.setBfrSttsChgDt("");
|
|
||||||
crdnSttsHstry.setCrdnSttsCd(crdn.getCrdnSttsCd());
|
|
||||||
crdnSttsHstry.setTaskDtlId(taskDtlId);
|
|
||||||
crdnSttsHstry.setEtcCn("");
|
|
||||||
|
|
||||||
result = crdnSttsHstryBean.create(crdnSttsHstry);
|
|
||||||
if (!result) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if(!fileInfoList.isEmpty()) {
|
|
||||||
fileInfoList.forEach(fileInfo -> fileInfo.setInfoType(Crdn.INF_TYPE).setInfoKey(crdn.getCrdnId()));
|
|
||||||
fileBean.create(fileInfoList);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,100 +0,0 @@
|
|||||||
package cokr.xit.fims.crdn.service.bean;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import cokr.xit.fims.crdn.Crdn;
|
|
||||||
import cokr.xit.fims.crdn.CrdnQuery;
|
|
||||||
import cokr.xit.fims.crdn.dao.Crdn06Mapper;
|
|
||||||
import cokr.xit.fims.crdn.service.CrdnService;
|
|
||||||
import cokr.xit.foundation.component.AbstractServiceBean;
|
|
||||||
import cokr.xit.foundation.data.DataObject;
|
|
||||||
|
|
||||||
/**단속 관리 서비스 인터페이스의 구현체
|
|
||||||
* @author leebj
|
|
||||||
*/
|
|
||||||
@Service("crdn06Service")
|
|
||||||
public class Crdn06ServiceBean extends AbstractServiceBean implements CrdnService {
|
|
||||||
|
|
||||||
@Resource(name="crdn06Mapper")
|
|
||||||
protected Crdn06Mapper crdn06Mapper;
|
|
||||||
|
|
||||||
/** 단속관리 Bean */
|
|
||||||
@Resource(name="crdn06Bean")
|
|
||||||
protected Crdn06Bean crdn06Bean;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<DataObject> getCrackdownList(CrdnQuery req) {
|
|
||||||
List<DataObject> dataObjectList = new ArrayList<DataObject>();
|
|
||||||
switch (ifEmpty(req.getGrid(), () -> "")) {
|
|
||||||
case "tagInformationUndefinedData":
|
|
||||||
dataObjectList = crdn06Mapper.selectTagInformationUndefinedDataList(req.setOrderBy("CRDN_ID"));
|
|
||||||
break;
|
|
||||||
case "fineReductionData":
|
|
||||||
dataObjectList = crdn06Mapper.selectFineReductionDataList(req.setOrderBy("CRDN_ID"));
|
|
||||||
break;
|
|
||||||
case "photo":
|
|
||||||
dataObjectList = crdn06Mapper.selectPhotoInspectionDataList(req.setOrderBy("VHRNO, CRDN_PLC"));
|
|
||||||
break;
|
|
||||||
case "sameVehicleMain":
|
|
||||||
dataObjectList = crdn06Mapper.selectSameVehicleMainList(req.setOrderBy("VHRNO"));
|
|
||||||
break;
|
|
||||||
case "sameVehicleSub":
|
|
||||||
dataObjectList = crdn06Mapper.selectSameVehicleSubList(req.setOrderBy("CRDN_ID"));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
dataObjectList = crdn06Mapper.selectCrackdownList(req.setOrderBy("CRDN_ID"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ifEmpty(req.getGrid(), () -> "").equals("tagInformationUndefinedData")
|
|
||||||
|| ifEmpty(req.getGrid(), () -> "").equals("fineReductionData")) {
|
|
||||||
Iterator<DataObject> iterator = dataObjectList.iterator();
|
|
||||||
while(iterator.hasNext()) {
|
|
||||||
DataObject dataObject = iterator.next();
|
|
||||||
String state = dataObject.string("CRDN_STTS_CD");
|
|
||||||
int advntceLevyAmt = dataObject.number("ADVNTCE_LEVY_AMT").intValue();
|
|
||||||
int levyAmt = dataObject.number("LEVY_AMT").intValue();
|
|
||||||
int minusAmt = dataObject.number("MINUS_AMT").intValue();
|
|
||||||
int adtnAmt = dataObject.number("ADTN_AMT").intValue();
|
|
||||||
int rcvmtAmt = dataObject.number("RCVMT_AMT").intValue();
|
|
||||||
|
|
||||||
dataObject.set("BLNC", crdn06Bean.getBalance(state,advntceLevyAmt,levyAmt,minusAmt,adtnAmt,rcvmtAmt));
|
|
||||||
}
|
|
||||||
} else if(ifEmpty(req.getGrid(), () -> "").equals("photo")) {
|
|
||||||
Iterator<DataObject> iterator = dataObjectList.iterator();
|
|
||||||
while(iterator.hasNext()) {
|
|
||||||
DataObject dataObject = iterator.next();
|
|
||||||
|
|
||||||
if(dataObject.number("ATCH_FILE_CNT").intValue() < 1) {
|
|
||||||
dataObject.set("INSP_RSLT", "사진없음");
|
|
||||||
dataObject.set("PRCS_MTHD", "해당자료에 사진을 등록하시기 바랍니다.");
|
|
||||||
} else if(dataObject.number("CRDN_CNT").intValue() > 1) {
|
|
||||||
dataObject.set("INSP_RSLT", "중복자료");
|
|
||||||
if(req.getTaskSeCd().equals("PVS")) {
|
|
||||||
dataObject.set("PRCS_MTHD", "한건을 시간초과로 처리하십시요.");
|
|
||||||
} else {
|
|
||||||
dataObject.set("PRCS_MTHD", "한건을 서손으로 처리하십시요.");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dataObject.set("INSP_RSLT", "정상자료");
|
|
||||||
dataObject.set("PRCS_MTHD", "정상자료");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return dataObjectList;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public boolean update(Crdn crdn) {
|
|
||||||
return crdn06Bean.update(crdn);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue