Introduction:

With the rapid development of society, the influence of computer is comprehensive and deep. With the continuous improvement of people’s living standards, people’s requirements for policy management are also increasing in daily life, and the number of policy management is increasing, making the development of policy management system become necessary and urgent. Agricultural policy management system is mainly with the help of computers, through the agricultural policy management system required information management, increase user choice, but also convenient for the vast number of users information timely query, modify and timely understanding of the poor. The policy management system of supporting farmers and helping farmers brings more convenience to users. The system collaborates with database management system software to meet the needs of users.

Functional design:

System business flow chart, as shown in the figure:

System architecture diagram belongs to the system design stage, system architecture diagram is only a product of this stage, the overall architecture of the system determines the mode of the whole system, is the foundation of the system. The overall structural design of the policy management system is shown in the figure below:

Function screenshots:

System home page: On the home page of the system, you can view the home page, poverty households, poverty alleviation policies, volunteer recruitment, message feedback, personal center, background management and other information for detailed operation

Login and registration: Log in or register information by entering the user name and password

Information of poor households:

You can view the number, number of family members, home address, family status, cover page, per capita income, account number, name and details on the page

Information on Rural Support Policy:

 

Volunteer wanted:

On the volunteer recruitment page, you can view the recruitment title, position, salary, working place, working time, recruitment number, recruitment time, deadline, person in charge, contact information, pictures, release date and other information, and save the information

Feedback: Enter the message content on the feedback page and submit or reset the message immediately

Personal center: On the personal center page, you can modify your personal information by filling in your account number, password, name, age, gender, mobile phone, email, upload pictures and other information. You can also operate my collection in detail

Background management terminal:

User management: On the user management page, you can perform detailed operations on index, account, name, age, gender, mobile phone, email, and photo

Poor family management: in the poor family management page, you can index, number, family members, number of members, home address, cover, per capita income, account number, name, audit reply, audit status, audit and other information for details or delete operations

Agricultural policy information: you can modify or delete the index, title, type of poverty alleviation, release time, cover and other information in the page of poverty alleviation policy management

Volunteer recruitment: you can modify or delete the index, recruitment title, position, salary, working place, working time, recruitment number, recruitment time, deadline, person in charge, contact information, picture, release date and other information in the volunteer recruitment management page

Volunteer recruitment: user recruitment management, in the user recruitment management page can index, recruitment title, position, whether to apply, apply time, account number, name, mobile phone, review reply, review status, review and other information for details or delete operations

Message board management: in the message board management page you can index, user name, message content, reply content and other information for details, reply, modify or delete operations

Multicast chart management: You can modify indexes, names, and values on the multicast chart management page

Code implementation:



/** * Hot news * back-end interface *@author 
 * @email 
 * @dateThe 2022-03-07 09:32:05 * /
@RestController
@RequestMapping("/remenxinwen")
public class RemenxinwenController {
    @Autowired
    private RemenxinwenService remenxinwenService;
    


    /** * Back-end list */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,RemenxinwenEntity remenxinwen,
		HttpServletRequest request){
        EntityWrapper<RemenxinwenEntity> ew = new EntityWrapper<RemenxinwenEntity>();
		PageUtils page = remenxinwenService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, remenxinwen), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,RemenxinwenEntity remenxinwen, 
		HttpServletRequest request){
        EntityWrapper<RemenxinwenEntity> ew = new EntityWrapper<RemenxinwenEntity>();
		PageUtils page = remenxinwenService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, remenxinwen), params), params));
        return R.ok().put("data", page);
    }

	/** * list */
    @RequestMapping("/lists")
    public R list( RemenxinwenEntity remenxinwen){
       	EntityWrapper<RemenxinwenEntity> ew = new EntityWrapper<RemenxinwenEntity>();
      	ew.allEq(MPUtil.allEQMapPre( remenxinwen, "remenxinwen")); 
        return R.ok().put("data", remenxinwenService.selectListView(ew));
    }

	 /** * query */
    @RequestMapping("/query")
    public R query(RemenxinwenEntity remenxinwen){
        EntityWrapper< RemenxinwenEntity> ew = new EntityWrapper< RemenxinwenEntity>();
 		ew.allEq(MPUtil.allEQMapPre( remenxinwen, "remenxinwen")); 
		RemenxinwenView remenxinwenView =  remenxinwenService.selectView(ew);
		return R.ok("Hot news query succeeded").put("data", remenxinwenView);
    }
	
    /** ** */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        RemenxinwenEntity remenxinwen = remenxinwenService.selectById(id);
		remenxinwen.setClicknum(remenxinwen.getClicknum()+1);
		remenxinwen.setClicktime(new Date());
		remenxinwenService.updateById(remenxinwen);
        return R.ok().put("data", remenxinwen);
    }

    /** * Front-end details */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        RemenxinwenEntity remenxinwen = remenxinwenService.selectById(id);
		remenxinwen.setClicknum(remenxinwen.getClicknum()+1);
		remenxinwen.setClicktime(new Date());
		remenxinwenService.updateById(remenxinwen);
        return R.ok().put("data", remenxinwen);
    }
    



    /** * The backend saves */
    @RequestMapping("/save")
    public R save(@RequestBody RemenxinwenEntity remenxinwen, HttpServletRequest request){
    	remenxinwen.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(remenxinwen);
        remenxinwenService.insert(remenxinwen);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody RemenxinwenEntity remenxinwen, HttpServletRequest request){
    	remenxinwen.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(remenxinwen);
        remenxinwenService.insert(remenxinwen);
        return R.ok();
    }

    /** * modify */
    @RequestMapping("/update")
    public R update(@RequestBody RemenxinwenEntity remenxinwen, HttpServletRequest request){
        //ValidatorUtils.validateEntity(remenxinwen);
        remenxinwenService.updateById(remenxinwen);// All updates
        return R.ok();
    }
    

    /** * delete */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        remenxinwenService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /** * remind interface */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")! =null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")! =null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<RemenxinwenEntity> wrapper = new EntityWrapper<RemenxinwenEntity>();
		if(map.get("remindstart")! =null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")! =null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = remenxinwenService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	/** * front-end intelligent sorting */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,RemenxinwenEntity remenxinwen, HttpServletRequest request,String pre){
        EntityWrapper<RemenxinwenEntity> ew = new EntityWrapper<RemenxinwenEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
		Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<String, Object> entry = it.next();
			String key = entry.getKey();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort"."clicknum");
        params.put("order"."desc");
		PageUtils page = remenxinwenService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, remenxinwen), params), params));
        return R.ok().put("data", page); }}Copy the code

Database design:

Transform the e-R diagram of database conceptual design into a relational database. In a relational database, data relationships consist of data tables, but the structure of the table is expressed in the fields of the table. The database field name is convenient and quick to write, do not recommend this writing method, please refer to the database table field design specification preparation

Table 4-1: Favorites list

The field names type The length of the Fields that
id bigint A primary key
addtime timestamp Creation time
userid bigint The user id
refid bigint The collection id
tablename varchar 200 The name of the table
name varchar 200 The name of the collection
picture varchar 200 Collect pictures
type varchar 200 Type (1: Favorites,21: likes,22: Stomps)
inteltype varchar 200 Recommend type

Table 4-2: Poverty alleviation policies

The field names type The length of the Fields that
id bigint A primary key
addtime timestamp Creation time
biaoti varchar 200 The title
xinwenleixing varchar 200 Poverty alleviation type
neirong longtext 4294967295 content
fabushijian date Release time
fengmian varchar 200 The cover
clicktime datetime Last click time
clicknum int Click on the number of times

Table 4-3: Poor households

The field names type The length of the Fields that
id bigint A primary key
addtime timestamp Creation time
bianhao varchar 200 Serial number
jiatingchengyuan varchar 200 Members of the family
chengyuanrenshu int membership
jiatingzhuzhi varchar 200 Home address
jiatingzhuangkuang longtext 4294967295 Family situation
fengmian varchar 200 The cover
renjunshouru int Per capita income
xiangxijieshao longtext 4294967295 Detailed introduction
zhanghao varchar 200 account
xingming varchar 200 The name
sfsh varchar 200 Whether the audit
shhf longtext 4294967295 Review the reply
clicktime datetime Last click time
clicknum int Click on the number of times

Table 4-4: Message boards

The field names type The length of the Fields that
id bigint A primary key
addtime timestamp Creation time
userid bigint A message people id
username varchar 200 The user name
content longtext 4294967295 Message content
cpicture varchar 200 Message pictures
reply longtext 4294967295 Reply content
rpicture varchar 200 Reply the picture

Table 4-6: Volunteer recruitment

The field names type The length of the Fields that
id bigint A primary key
addtime timestamp Creation time
zhaopinbiaoti varchar 200 Job title
zhiwei varchar 200 position
zhaopinyaoqiu longtext 4294967295 Job requirement
gongzidaiyu varchar 200 wages
gongzuodidian varchar 200 Working place
gongzuoshijian varchar 200 Working time
zhaopinrenshu int hiring
zhaopinshijian date Hiring time
jiezhishijian date By the time
fuzeren varchar 200 head
lianxifangshi varchar 200 contact
tupian varchar 200 The picture
faburiqi date The release date
clicktime datetime Last click time
clicknum int Click on the number of times

Table 4-7: User applications

The field names type The length of the Fields that
id bigint A primary key
addtime timestamp Creation time
zhaopinbiaoti varchar 200 Job title
zhiwei varchar 200 position
shifouyingpin varchar 200 Whether to apply for
yingpinyuanyin longtext 4294967295 Apply for reason
yingpinshijian date To apply for time
zhanghao varchar 200 account
xingming varchar 200 The name
shouji varchar 200 Mobile phone
sfsh varchar 200 Whether the audit
shhf longtext 4294967295 Review the reply

Table 4-8: Users

The field names type The length of the Fields that
id bigint A primary key
addtime timestamp Creation time
zhanghao varchar 200 account
mima varchar 200 password
xingming varchar 200 The name
nianling varchar 200 age
xingbie varchar 200 gender
shouji varchar 200 Mobile phone
youxiang varchar 200 email
zhaopian varchar 200 photo

Thesis Reference: