package com.gcl.controller;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.metamodel.SetAttribute;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.gcl.po.Auctioncompany;
import com.gcl.po.Auctioneer;
import com.gcl.po.Businessda;
import com.gcl.po.Client;
import com.gcl.po.Deadpawnagedispose;
import com.gcl.po.Deadpawnagedisposedetail;
import com.gcl.po.Deadpawnagedisposesaledetail;
import com.gcl.po.Deadpawnagedisposeselldetail;
import com.gcl.po.Pawn;
import com.gcl.po.Pawndetail;
import com.gcl.po.Pawntype;
import com.gcl.po.Redeemdetail;
import com.gcl.po.Renewalofpawn;
import com.gcl.po.Renewalofpawndetai;
import com.gcl.service.AuctioncompanyService;
import com.gcl.service.AuctioneerService;
import com.gcl.service.BusinessdaService;
import com.gcl.service.ClientService;
import com.gcl.service.DeadpawnageService;
import com.gcl.service.PawnService;
import com.gcl.service.PawndetailService;
import com.gcl.service.PawntypeService;
import com.gcl.service.PawntypedetailService;
import com.gcl.service.RedeemdetailService;
import com.gcl.service.RenewalofpawnService;
import com.gcl.util.DateUtil;
import com.gcl.util.enums.CertificateType;
import com.gcl.util.enums.ClientType;
import com.gcl.util.enums.Pawnstate;
import com.gcl.util.query.Page;
import com.gcl.vo.Deadpawnagegoodsvo;
import com.gcl.vo.Deadpawndetailvo;
import com.gcl.vo.Deadpawnselectvo;
import com.gcl.vo.Deadpawnvo;
/**
* 绝当处置
*
* @author 崇良
*
*/
@Controller
@RequestMapping("deadpawnage")
public class DeadpawnageController extends baseController {
@Autowired
private DeadpawnageService deadpawnageService;
@Autowired
private PawndetailService pawndetailService;
@Autowired
private PawnService pawnService;
@Autowired
private RenewalofpawnService renewalofpawnService;
@Autowired
private BusinessdaService businessdaService;
@Autowired
private ClientService clientService;
@Autowired
private AuctioncompanyService auctioncompanyService;
@Autowired
private AuctioneerService auctioneerService;
@Autowired
private PawntypedetailService pawntypedetailService;
// =============绝当处置开始=================
// 绝当处置
@RequestMapping("deadpawnagehandle")
public String deadpawnagehandle(String pawnnumber, String pawnname,
String papersnumber, String clientname, String beginDate,
String endDate, String pawnmoneygtstr, String pawnmoneyltstr,
String selectidgather, String deadpawnid, String operatetype,
String updateing) throws ParseException {
DateUtil dateUtil = new DateUtil();
if ("".equals(pawnnumber)) {
pawnnumber = null;
}
if ("".equals(pawnname)) {
pawnname = null;
}
if ("".equals(papersnumber)) {
papersnumber = null;
}
if ("".equals(clientname)) {
clientname = null;
}
if ("".equals(beginDate)) {
beginDate = null;
}
if ("".equals(endDate)) {
endDate = null;
}
if (pawnmoneygtstr == null || "".equals(pawnmoneygtstr)) {
pawnmoneygtstr = "0";
}
if (pawnmoneyltstr == null || "".equals(pawnmoneyltstr)) {
pawnmoneyltstr = "0";
}
if ("".equals(deadpawnid)) {
deadpawnid = null;
}
if ("".equals(operatetype)) {
operatetype = null;
}
// deadpawnid不为空证明是修改操作 =========开始
if (deadpawnid != null && !"".equals(deadpawnid)) {
if (operatetype != null && !"".equals(operatetype)) {
request.setAttribute("deadpawnid", deadpawnid);
request.setAttribute("operatetype", operatetype);
// 执行修改操作
Deadpawnagedisposedetail deadpawnagedisposedetail = this.deadpawnageService
.selectdeadpawnagedisposedetaiByPrimaryKey(Integer
.parseInt(deadpawnid));
Deadpawnagedispose deadpawnagedispose = this.deadpawnageService
.selectDeadpawnagedisposeByPrimaryKey(deadpawnagedisposedetail
.getDeadpawnagedisposeid());
request.setAttribute("deadpawnagedispose", deadpawnagedispose);
if ("1".equals(deadpawnagedispose.getDisposeway())) {
Deadpawnagedisposeselldetail deadpawnagedisposeselldetail = this.deadpawnageService
.selectDeadpawnagedisposeselldetailByPrimaryKey(deadpawnagedispose
.getId());
Client client = this.clientService
.findbyid(deadpawnagedisposeselldetail
.getClientid());
client.setPapersnameid(CertificateType.valueOf(
client.getPapersnameid()).getLabel());
request.setAttribute("deadpawnagedisposeselldetail",
deadpawnagedisposeselldetail);
request.setAttribute("client", client);
} else if ("2".equals(deadpawnagedispose.getDisposeway())) {
Deadpawnagedisposesaledetail deadpawnagedisposesaledetail = this.deadpawnageService
.findalldeadpawnagedisposesaledetailbydeadpawnagedisposesaleid(deadpawnagedispose
.getId());
Auctioncompany auctioncompany = this.auctioncompanyService
.findbyid(deadpawnagedisposesaledetail
.getAuctioncompanyid());
Auctioneer auctioneer = this.auctioneerService
.findbyid(deadpawnagedisposesaledetail
.getAuctioneerid());
request.setAttribute("deadpawnagedisposesaledetail",
deadpawnagedisposesaledetail);
request.setAttribute("auctioncompany", auctioncompany);
request.setAttribute("auctioneer", auctioneer);
}
if ("updateing".equals(updateing)) {
List<Deadpawnagedisposedetail> deadpawnagedisposedetails = this.deadpawnageService
.findallbydeadpawnagedisposeid(deadpawnagedispose
.getId());
for (Deadpawnagedisposedetail deadpawnagedisposedetail2 : deadpawnagedisposedetails) {
if (selectidgather == null || "".equals(selectidgather)) {
selectidgather = "";
selectidgather = deadpawnagedisposedetail2
.getPawndetailid().toString();
} else {
selectidgather = selectidgather
+ ","
+ deadpawnagedisposedetail2
.getPawndetailid();
}
}
}
}
}
// deadpawnid不为空证明是修改操作 =========结束
String currentpageString = request.getParameter("currentPage");
if (currentpageString == null || "".equals(currentpageString)) {
currentpageString = "1";
}
Page<Deadpawnvo> query = new Page<Deadpawnvo>();
query.setCurrentPage(Integer.parseInt(currentpageString));
query.setPageSize(8);
BigDecimal pawnmoneygt = new BigDecimal(pawnmoneygtstr);
BigDecimal pawnmoneylt = new BigDecimal(pawnmoneyltstr);
Page<Deadpawnvo> page = this.deadpawnageService.queryPage(query,
pawnnumber, pawnname, papersnumber, clientname, beginDate,
endDate, pawnmoneygt, pawnmoneylt);
for (Deadpawnvo deadpawnvo : page.result) {
deadpawnvo.setPapersnameid(CertificateType.valueOf(
deadpawnvo.getPapersnameid()).getLabel());
deadpawnvo.setRemark(dateUtil.daysBetween(deadpawnvo.getEnddate(),
new Date()) + "天");
}
if (selectidgather != null && !"".equals(selectidgather)) {
List<Deadpawndetailvo> deadpawndetailvos = new ArrayList<Deadpawndetailvo>();
String[] ids = selectidgather.split(",");
for (String id : ids) {
List<Deadpawndetailvo> deadpawndetailvostwo = data(id);
for (Deadpawndetailvo deadpawndetailvo : deadpawndetailvostwo) {
deadpawndetailvos.add(deadpawndetailvo);
}
}
request.setAttribute("deadpawndetailvos", deadpawndetailvos);
request.setAttribute("selectidgather", selectidgather);
}
request.setAttribute("page", page);
returnparameter(pawnnumber, pawnname, pa
没有合适的资源?快使用搜索试试~ 我知道了~
spring+springmvc+mybatis搭建的一个典当系统附带mysql数据库
共1120个文件
svn-base:431个
class:125个
java:111个
2星 需积分: 9 86 下载量 161 浏览量
2017-04-26
14:34:51
上传
评论 2
收藏 12.52MB ZIP 举报
温馨提示
spring+springmvc+mybatis搭建的一个典当系统附带mysql数据库
资源推荐
资源详情
资源评论
收起资源包目录
spring+springmvc+mybatis搭建的一个典当系统附带mysql数据库 (1120个子文件)
all-wcprops 9KB
all-wcprops 7KB
all-wcprops 6KB
all-wcprops 4KB
all-wcprops 4KB
all-wcprops 4KB
all-wcprops 4KB
all-wcprops 3KB
all-wcprops 3KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 995B
all-wcprops 962B
all-wcprops 957B
all-wcprops 922B
all-wcprops 907B
all-wcprops 907B
all-wcprops 850B
all-wcprops 748B
all-wcprops 714B
all-wcprops 671B
all-wcprops 663B
all-wcprops 662B
all-wcprops 653B
all-wcprops 649B
all-wcprops 649B
all-wcprops 639B
all-wcprops 618B
all-wcprops 618B
all-wcprops 614B
all-wcprops 611B
all-wcprops 597B
all-wcprops 582B
all-wcprops 561B
all-wcprops 555B
all-wcprops 552B
all-wcprops 552B
all-wcprops 549B
all-wcprops 549B
all-wcprops 546B
all-wcprops 540B
all-wcprops 509B
all-wcprops 470B
all-wcprops 434B
all-wcprops 424B
all-wcprops 420B
all-wcprops 414B
all-wcprops 414B
all-wcprops 410B
all-wcprops 398B
all-wcprops 394B
all-wcprops 388B
all-wcprops 386B
all-wcprops 382B
all-wcprops 380B
all-wcprops 374B
all-wcprops 372B
all-wcprops 348B
all-wcprops 348B
all-wcprops 336B
all-wcprops 336B
all-wcprops 332B
all-wcprops 330B
all-wcprops 326B
all-wcprops 322B
all-wcprops 169B
all-wcprops 167B
all-wcprops 165B
all-wcprops 164B
all-wcprops 163B
all-wcprops 163B
all-wcprops 158B
all-wcprops 149B
all-wcprops 146B
all-wcprops 144B
all-wcprops 143B
all-wcprops 139B
all-wcprops 139B
DeadpawnageController.class 31KB
RedeemController.class 26KB
RenewalofpawnController.class 24KB
PawnController.class 21KB
OrganizationCodeController.class 12KB
PawnstateController.class 11KB
DeadpawnagegoodsController.class 8KB
DeadpawnageServiceImpl.class 7KB
Pawn.class 7KB
PawnexpirepromptController.class 6KB
AuctioneerController.class 5KB
Pawndetail.class 5KB
PawndetailServiceImpl.class 5KB
ClientController.class 5KB
Deadpawnvo.class 5KB
UserController.class 4KB
Pawnvo.class 4KB
共 1120 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
- weixin_362103082020-04-30没有jar包兄弟
岽仔玖等
- 粉丝: 299
- 资源: 215
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功