새올요청자료 삭제 기능 추가

main
이범준 1 year ago
parent eaa281cd4b
commit a394412c0d

@ -51,7 +51,7 @@ public interface CrdnUpdtMapper extends AbstractMapper {
int updateCrdnAddition(Crdn crdn);
/** .
* @param params
* @param map
* @return
*/
int removeCrdn(Map<String, Object> map);

@ -84,6 +84,6 @@ public class CrdnBean extends AbstractComponent {
paramMap.put("crdnIDs", crdnIdList);
paramMap.put("removedBy", UserInfo.current().getId());
return crdnUpdtMapper.removeCrdn(paramMap) == 1 ? true : false;
return crdnUpdtMapper.removeCrdn(paramMap) >= 1 ? true : false;
}
}

@ -1,6 +1,7 @@
package cokr.xit.fims.cvlc.dao;
import java.util.List;
import java.util.Map;
import org.egovframe.rte.psl.dataaccess.mapper.Mapper;
@ -27,4 +28,10 @@ public interface SaCvlcptIndviDmndMapper extends AbstractMapper {
*/
int insertDmndDataInfo(CrdnCvlcpt crdnCvlcpt);
/** .
* @param map
* @return
*/
int deleteDmndDataInfo(Map<String, Object> map);
}

@ -121,4 +121,9 @@ public interface CrdnCvlcptService {
*/
boolean createDmndDataInfo(CrdnCvlcpt crdnCvlcpt);
/** .
* @param indivIDs ID
* @return
*/
boolean removeDmndDataInfo(String... indivIDs);
}

@ -1,8 +1,11 @@
package cokr.xit.fims.cvlc.service.bean;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
@ -342,4 +345,22 @@ public class CrdnCvlcptMainBean extends AbstractComponent {
return saCvlcptIndviDmndMapper.insertDmndDataInfo(crdnCvlcpt) == 1 ? true : false;
}
/** .
* @param indivIDs ID
* @return
* <ul><li> true</li>
* <li> false</li>
* </ul>
*/
public boolean removeDmndDataInfo(String... indivIDs) {
if (isEmpty(indivIDs)) return false;
Map<String, Object> paramMap = new HashMap<String, Object>();
List<String> indivIdList = Arrays.asList(indivIDs);
paramMap.put("indivIDs", indivIdList);
paramMap.put("removedBy", UserInfo.current().getId());
return saCvlcptIndviDmndMapper.deleteDmndDataInfo(paramMap) >= 1 ? true : false;
}
}

@ -736,4 +736,9 @@ public class CrdnCvlcptServiceBean extends AbstractServiceBean implements CrdnCv
return crdnCvlcptMainBean.createDmndDataInfo(crdnCvlcpt);
}
@Override
public boolean removeDmndDataInfo(String... indivIDs) {
return crdnCvlcptMainBean.removeDmndDataInfo(indivIDs);
}
}

@ -26,7 +26,8 @@ public class Cvlc04Controller extends ApplicationController {
public class METHOD_URL {
public static final String
getDmndDataList = "/010/list.do",
createDmndDataInfo = "/010/create.do"
createDmndDataInfo = "/010/create.do",
removeDmndDataInfo = "/010/remove.do"
;
}
@ -88,4 +89,20 @@ public class Cvlc04Controller extends ApplicationController {
.addObject("saved", saved);
}
/** .
* @param IDs ID
* @return jsonView
* <pre><code> {
* "affected":
* "saved": true, false
* }</code></pre>
*/
public ModelAndView removeDmndDataInfo(String[] IDs) {
boolean saved = crdnCvlcptService.removeDmndDataInfo(IDs);
return new ModelAndView("jsonView")
.addObject("saved", saved);
}
}

@ -130,6 +130,12 @@ public class BpvController {
return super.createDmndDataInfo(crdnCvlcpt);
}
@Override
@RequestMapping(name="전용차로과태료업무 새올요청자료 삭제", value=METHOD_URL.removeDmndDataInfo)
public ModelAndView removeDmndDataInfo(String[] IDs) {
return super.removeDmndDataInfo(IDs);
}
}
@Controller

@ -132,6 +132,12 @@ public class DpvController {
return super.createDmndDataInfo(crdnCvlcpt);
}
@Override
@RequestMapping(name="장애인과태료업무 새올요청자료 삭제", value=METHOD_URL.removeDmndDataInfo)
public ModelAndView removeDmndDataInfo(String[] IDs) {
return super.removeDmndDataInfo(IDs);
}
}
@Controller

@ -130,6 +130,12 @@ public class EcaController {
return super.createDmndDataInfo(crdnCvlcpt);
}
@Override
@RequestMapping(name="전기차과태료업무 새올요청자료 삭제", value=METHOD_URL.removeDmndDataInfo)
public ModelAndView removeDmndDataInfo(String[] IDs) {
return super.removeDmndDataInfo(IDs);
}
}
@Controller

@ -135,6 +135,12 @@ public class PvsController {
return super.createDmndDataInfo(crdnCvlcpt);
}
@Override
@RequestMapping(name="주정차과태료업무 새올요청자료 삭제", value=METHOD_URL.removeDmndDataInfo)
public ModelAndView removeDmndDataInfo(String[] IDs) {
return super.removeDmndDataInfo(IDs);
}
}
@Controller

@ -71,4 +71,15 @@ INSERT
)
</insert>
<update id="deleteDmndDataInfo" parameterType="map">
/* 새올요청자료 삭제(saCvlcptIndviDmndMapper.deleteDmndDataInfo) */
UPDATE TB_SA_CVLCPT_INDIV_DMND
SET DEL_YN = 'Y'
, DEL_DT = <include refid="utility.now" /> /* 삭제일시 */
, DLTR = #{removedBy} /* 삭제자 */
WHERE INDIV_ID IN (
<foreach collection="indivIDs" item="indivId" separator=",">#{indivId}</foreach>
)
</update>
</mapper>

@ -449,7 +449,7 @@ $(document).ready(function(){
if(rcptYmd != null){
var ds = $P.crdnControl.dataset.getDataset();
var crdnIds = ds.map(function(item){
var crdnIds = ds.filter(function(item){
if(item['CVLCPT_RCPT_YMD'] == rcptYmd && !$P.holdList.includes(item['CRDN_ID'])){
return item["CRDN_ID"];
}

@ -251,6 +251,7 @@ $(document).ready(function(){
if (resp.saved){
$("#toastText--${pageName}").html("삭제 되었습니다.");
$P.toast.show();
$P.refreshDmndList();
}
}
@ -362,17 +363,10 @@ $(document).ready(function(){
return data;
}
$P.fnRemove = (allCompleteData) => {
if(allCompleteData){
var ds = $P.dmndControl.dataset.getDataset();
var indivIds = ds.map(function(item){
if(item['STTS_CD'] == '9'){
return item["INDIV_ID"];
}
});
$P.dmndControl.select(indivIds,true);
$P.fnRemove = (allCompleteDataIds) => {
if(allCompleteDataIds != null){
$P.dmndControl.select(allCompleteDataIds,true);
} else {
var cur = $P.dmndControl.getCurrent();
if(cur == null){
@ -383,7 +377,7 @@ $(document).ready(function(){
$P.dmndControl.select(curKey,true);
}
// TODO : 요청 삭제 서비스 //$P.dmndControl.remove();
$P.dmndControl.remove();
}
$P.fnRemoveAllCompleteData = () => {
@ -391,11 +385,24 @@ $(document).ready(function(){
if(cur == null){
return;
}
var ds = $P.dmndControl.dataset.getDataset();
var indivIds = ds.filter(function(item){
if(item['STTS_CD'] == '9'){
return item["INDIV_ID"];
}
});
if(indivIds.length == 0){
dialog.alert("요청 완료자료가 없습니다.");
return;
}
dialog.alert({
content : "완료된 자료를 모두 삭제하시겠습니까?",
onOK : () => {
$P.fnRemove(true);
$P.fnRemove(indivIds);
}
});
}
@ -450,7 +457,7 @@ $(document).ready(function(){
$("#table-responsive--${pageName}").scroll(function(){ $P.scrollEnd(this); });
$("#btnOpenDmndPop--${pageName}").on("click", () => $P.fnOpenDmndPop());
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove(false));
$("#btnDelete--${pageName}").on("click", () => $P.fnRemove(null));
$("#btnDeleteAllCompleteData--${pageName}").on("click", () => $P.fnRemoveAllCompleteData());
/**************************************************************************

Loading…
Cancel
Save