|
|
|
|
@ -1,11 +1,13 @@
|
|
|
|
|
package cfs.standard.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
import java.time.YearMonth;
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
@ -16,12 +18,15 @@ import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import cfs.common.util.CarNo2Code;
|
|
|
|
|
import cfs.common.util.HttpUtil;
|
|
|
|
|
import cfs.common.util.ObjectUtil;
|
|
|
|
|
import cfs.common.util.StringUtil;
|
|
|
|
|
import cfs.common.vo.ParamBean;
|
|
|
|
|
import cfs.fine.vo.PenaltyParamVO;
|
|
|
|
|
import cfs.standard.dao.StandardCodeInfoDao;
|
|
|
|
|
import cfs.standard.service.StandardCodeInfoService;
|
|
|
|
|
import cfs.standard.vo.LocalResidentsExcelUpVO;
|
|
|
|
|
import cfs.standard.vo.StandardCodeInfoVO;
|
|
|
|
|
|
|
|
|
|
@Service("StandardCodeInfoService")
|
|
|
|
|
@ -179,6 +184,63 @@ public class StandardCodeInfoServiceImpl implements StandardCodeInfoService{
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int insertLocalResidentsCars(LocalResidentsExcelUpVO param) throws Exception {
|
|
|
|
|
|
|
|
|
|
String today = (new SimpleDateFormat ("yyyyMMdd")).format(new Date());
|
|
|
|
|
|
|
|
|
|
int result = 0;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<String,Object>();
|
|
|
|
|
map.put("carNo", param.getCarNo());
|
|
|
|
|
map.put("carNoHex", CarNo2Code.runCarNo2Code(param.getCarNo()));
|
|
|
|
|
String levyStdde = StringUtil.nullToNull(param.getLevyStdde()).replaceAll("-", "").replaceAll("/", "");
|
|
|
|
|
if(levyStdde.equals("")){
|
|
|
|
|
levyStdde = today;
|
|
|
|
|
}
|
|
|
|
|
map.put("levyStdde", levyStdde);
|
|
|
|
|
|
|
|
|
|
String remarks = "";
|
|
|
|
|
String remarks1 = StringUtil.nullToNull(param.getRemarks1());
|
|
|
|
|
String remarks2 = StringUtil.nullToNull(param.getRemarks1());
|
|
|
|
|
if(remarks1.equals("01000000000")){
|
|
|
|
|
remarks1 = "";
|
|
|
|
|
}
|
|
|
|
|
if(remarks2.equals("01000000000")){
|
|
|
|
|
remarks2 = "";
|
|
|
|
|
}
|
|
|
|
|
if(remarks1.equals(remarks2)){
|
|
|
|
|
remarks = remarks1;
|
|
|
|
|
} else {
|
|
|
|
|
remarks = remarks1 + " / "+ remarks2;
|
|
|
|
|
}
|
|
|
|
|
map.put("remarks", remarks);
|
|
|
|
|
String seq = "";
|
|
|
|
|
Map<String,Object> existMap = StandardCodeInfoDao.selectLocalResidents(map);
|
|
|
|
|
|
|
|
|
|
if(existMap == null || existMap.isEmpty()){
|
|
|
|
|
StandardCodeInfoDao.insertLocalResidents(map);
|
|
|
|
|
seq = map.get("SCAR_SEQ").toString();
|
|
|
|
|
} else {
|
|
|
|
|
seq = map.get("SCAR_SEQ").toString();
|
|
|
|
|
if(Integer.parseInt(existMap.get("APPLY_DATE").toString()) <= Integer.parseInt(map.get("levyStdde").toString())){
|
|
|
|
|
StandardCodeInfoDao.updateLocalResidents(map);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
map.put("scarSeq", seq);
|
|
|
|
|
StandardCodeInfoDao.insertGammyeon(map);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
result = 1;
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Map<String, String> findStandardExemptCarNo(StandardCodeInfoVO standardCodeInfoVO) throws Exception {
|
|
|
|
|
Map<String, String> result = null;
|
|
|
|
|
@ -679,6 +741,7 @@ public class StandardCodeInfoServiceImpl implements StandardCodeInfoService{
|
|
|
|
|
List<StandardCodeInfoVO> result =StandardCodeInfoDao.fineExemptErrorList();
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|